Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP build for Jenkins failing with 'Cannot run program "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

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 components (most recent)
like image 243
webjawns.com Avatar asked Aug 21 '12 17:08

webjawns.com


1 Answers

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:

  1. Click Manage Jenkins
  2. Click Configure System
  3. Add new environment variable where name is PATH and value is $PATH:/usr/local/zend/bin.
like image 129
webjawns.com Avatar answered Sep 21 '22 01:09

webjawns.com