zoukankan      html  css  js  c++  java
  • java.io.IOException: Cannot run program "/opt/jdk1.8.0_191/bin/java" (in directory "/var/lib/jenkins/workspace/xinguan"): error=2, No such file or directory

    测试jenkins构建,报错如下

    Parsing POMs
    Established TCP socket on 44463
    [xinguan] $ /opt/jdk1.8.0_191/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.13.jar:/opt/maven-3.6/boot/plexus-classworlds-2.5.2.jar:/opt/maven-3.6/conf/logging jenkins.maven3.agent.Maven35Main /opt/maven-3.6 /var/cache/jenkins/war/WEB-INF/lib/remoting-3.33.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.13.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.13.jar 44463
    ERROR: Failed to parse POMs
    java.io.IOException: Cannot run program "/opt/jdk1.8.0_191/bin/java" (in directory "/var/lib/jenkins/workspace/xinguan"): error=2, No such file or directory
    	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    	at hudson.Proc$LocalProc.<init>(Proc.java:250)
    	at hudson.Proc$LocalProc.<init>(Proc.java:219)
    	at hudson.Launcher$LocalLauncher.launch(Launcher.java:937)
    	at hudson.Launcher$ProcStarter.start(Launcher.java:455)
    	at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:280)
    	at hudson.maven.ProcessCache.get(ProcessCache.java:236)
    	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:804)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
    	at hudson.model.Run.execute(Run.java:1815)
    	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
    	at hudson.model.ResourceController.execute(ResourceController.java:97)
    	at hudson.model.Executor.run(Executor.java:429)
    Caused by: java.io.IOException: error=2, No such file or directory
    	at java.lang.UNIXProcess.forkAndExec(Native Method)
    	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
    	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    	... 12 more
    Finished: FAILURE
    

    手动确定了 /opt/jdk1.8.0_191/bin/java/var/lib/jenkins/workspace/xinguan 都是正常存在的目录,但还是报错没有文件或目录

    于是乎手动执行了一下上面提示的命令:

    [root@harbor jdk1.8.0_191]# /opt/jdk1.8.0_191/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.13.jar:/opt/maven-3.6/boot/plexus-classworlds-2.5.2.jar:/opt/maven-3.6/conf/logging jenkins.maven3.agent.Maven35Main /opt/maven-3.6 /var/cache/jenkins/war/WEB-INF/lib/remoting-3.33.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.13.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.13.jar
    -bash: /opt/jdk1.8.0_191/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
    

    哦吼,问题出来了,缺少依赖包glibc.i686,安装

    yum install glibc.i686 -y
    
  • 相关阅读:
    curl命令常见用法汇总 good
    Spring Boot flyway的启动时机比较早
    android 签名被篡改(Keystore was tampered with, or password was incorrect)
    android sdk 如何重新生成debug.keystore
    Android的debug.keystore拒绝访问导致的生成异常及解决方案
    Android生成keystore是报错拒绝访问
    android 高德地图出现【定位失败key鉴权失败】
    Android Studio开发入门-引用jar及so文件
    android 自定义AlertDialog(一段)
    Android自定义控件之日历控件
  • 原文地址:https://www.cnblogs.com/winstom/p/12067030.html
Copyright © 2011-2022 走看看