Cannot run program "gradle" (in directory "/var/lib/jenkins/workspace/Base Metals"): error=2, No such file or directory

Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Jenkins build failed for git repository path

    Stack Overflow | 1 year ago | Asif Cannot run program "/root/.jenkins/workspace/NestedWorkspace/gradlew" (in directory "/root/.jenkins/workspace/NestedWorkspace"): error=2, No such file or directory
  2. 0

    Jenkins job using Gradle can't find executable

    Stack Overflow | 2 years ago | ShatyUT Cannot run program "gradle" (in directory "/var/lib/jenkins/workspace/Journeyman-Android"): error=2, No such file or directory
  3. 0

    [JENKINS-15406] When using gradlew, root build script field is not used to locate gradlew - Jenkins JIRA | 1 year ago Cannot run program (in directory ): error=2, No such file or directory
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    My gradle build works fine when I do it via the command prompt. While doing it via Jenkins, I get the following error: Started by user anonymous Building in workspace /var/lib/jenkins/jobs/unite/workspace [Gradle] - Launching build. [workspace] $ gradle build -b /run/media/navin/Data/GitRepositories/unite/build.gradle FATAL: command execution failed Cannot run program "gradle" (in directory "/var/lib/jenkins/jobs/unite/workspace"): error=2, No such file or directory at java.lang.ProcessBuilder.start( at hudson.Proc$LocalProc.<init>( at hudson.Proc$LocalProc.<init>( at hudson.Launcher$LocalLauncher.launch( at hudson.Launcher$ProcStarter.start( at hudson.Launcher$ProcStarter.join( at hudson.plugins.gradle.Gradle.performTask( at hudson.plugins.gradle.Gradle.perform( at hudson.tasks.BuildStepMonitor$1.perform( at hudson.model.AbstractBuild$AbstractBuildExecution.perform( at hudson.model.Build$ at hudson.model.Build$BuildExecution.doRun( at hudson.model.AbstractBuild$ at hudson.model.Run.execute( at at hudson.model.ResourceController.execute( at Caused by: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>( at java.lang.ProcessImpl.start( at java.lang.ProcessBuilder.start( ... 16 more Build step 'Invoke Gradle script' changed build result to FAILURE Build step 'Invoke Gradle script' marked build as failure Collecting metadata... Metadata collection done. Finished: FAILURE Google searching showed the error could be because of not selecting the Gradle version But when I click the dropdown menu to select the Gradle version, there is no version number shown at all. There's just "Default". I'm using version 1.23 of the Gradle plugin, Firefox version 25, using Jenkins.war and starting it as sudo service jenkins start on localhost:8080. Using jdk1.7.0_45. This is my first install of Jenkins.

    Jenkins JIRA | 3 years ago | Navin I Cannot run program "gradle" (in directory "/var/lib/jenkins/jobs/unite/workspace"): error=2, No such file or directory

  1. rp 1 times, last 4 months ago
  2. michallos 1 times, last 5 months ago
  3. eti22 1 times, last 6 months ago
  4. asdasd 24 times, last 7 months ago
  5. rexgreenza 8 times, last 8 months ago
2 more registered users
93 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis


    error=2, No such file or directory

    at java.lang.UNIXProcess.forkAndExec()
  2. Java RT
    1. java.lang.UNIXProcess.forkAndExec(Native Method)
    2. java.lang.UNIXProcess.<init>(
    3. java.lang.ProcessImpl.start(
    4. java.lang.ProcessBuilder.start(
    4 frames
  3. Hudson
    1. hudson.Proc$LocalProc.<init>(
    2. hudson.Proc$LocalProc.<init>(
    3. hudson.Launcher$LocalLauncher.launch(
    4. hudson.Launcher$ProcStarter.start(
    5. hudson.Launcher$ProcStarter.join(
    5 frames
  4. hudson.plugins.gradle
    1. hudson.plugins.gradle.Gradle.performTask(
    2. hudson.plugins.gradle.Gradle.perform(
    2 frames
  5. Hudson
    1. hudson.tasks.BuildStepMonitor$1.perform(
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(
    3. hudson.model.Build$
    4. hudson.model.Build$BuildExecution.doRun(
    5. hudson.model.AbstractBuild$
    6. hudson.model.Run.execute(
    8. hudson.model.ResourceController.execute(
    9 frames