java.io.IOException: Cannot run program "hg": error=2, No such file or directory

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

Provide a working directory instead of pointing it to a file or an empty directory in process builder.

,
Expert tip

This is a bug in some versions of the Arduino IDE. Try updating to the version 1.6.12 or further.

Solutions on the web

via Jenkins JIRA by Vladimir Grichina, 1 year ago
Cannot run program "hg": error=2, No such file or directory
via Jenkins JIRA by Vladimir Grichina, 1 year ago
Cannot run program "hg": error=2, No such file or directory
via jenkins-ci.org by Unknown author, 1 year ago
via Stack Overflow by Teo Klestrup Röijezon
, 2 years ago
Cannot run program "hg" (in directory "/var/lib/jenkins/workspace/My-Repository"): java.io.IOException: error=2, No such file or directory
via Stack Overflow by BadmintonCat
, 8 months ago
Cannot run program "docker": error=2, No such file or directory
via Stack Overflow by priyank
, 1 year ago
Cannot run program "docker" (in directory "/var/lib/jenkins/jobs/workspace"): error=2, No such file or directory
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
at hudson.Proc$LocalProc.(Proc.java:244)
at hudson.Proc$LocalProc.(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:707)
at hudson.Launcher$ProcStarter.start(Launcher.java:338)
at hudson.Launcher$ProcStarter.join(Launcher.java:345)
at hudson.plugins.mercurial.MercurialSCM.clone(MercurialSCM.java:577)
at hudson.plugins.mercurial.MercurialSCM.checkout(MercurialSCM.java:422)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:568)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:457)
at hudson.model.Run.run(Run.java:1404)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

Users with the same issue

2 times, 1 month ago
Once, 1 month ago
Once, 2 months ago
15 times, 2 months ago
6 times, 3 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.