PHP生成的Jenkins失败与“无法运行程序”phploc“ [英] PHP build for Jenkins failing with 'Cannot run program "phploc"'
本文介绍了PHP生成的Jenkins失败与“无法运行程序”phploc“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试运行构建脚本时遇到以下错误。
I'm getting the following error when attempting to run my build script.
/var/lib/jenkins/jobs/IPS (trunk)/workspace/build.xml:62: Execute failed: java.io.IOException:
Cannot run program "phploc": java.io.IOException: error=2, No such file or directory
我尝试切换到 jenkins
能够运行脚本,没有障碍。我也检查了 $ PATH
并尝试重新安装。没有运气!
I tried switching to the jenkins
user and was able to run the script without a hitch. I also checked the $PATH
and tried reinstalling. No luck!
- CentOS 5/6
- PHP 5.4(Zend Server)
- Jenkins 1.477
- PHP QA组件(最新)
- CentOS 5/6
- PHP 5.4 (Zend Server)
- Jenkins 1.477
- PHP QA components (most recent)
推荐答案
我终于搞清楚了...检查 $ PATH
变量在此上下文中没有帮助。运行Jenkins作业时,不会执行各种shell启动文件,因此未正确填充 $ PATH
变量。
I finally figured this out... checking the $PATH
variable is not helpful in this context. The various shell startup files are not executed when running a Jenkins job, so the $PATH
variable was not being properly populated. This can be remedied by following the three steps below:
- 点击管理Jenkins
- 点击配置系统
- 添加新的环境变量,名称为
PATH
,值为$ PATH:/ usr / local / zend / bin
。
- Click Manage Jenkins
- Click Configure System
- Add new environment variable where name is
PATH
and value is$PATH:/usr/local/zend/bin
.
这篇关于PHP生成的Jenkins失败与“无法运行程序”phploc“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文