I am sure I am missing something basic here, but I cannot seem to get Drush to run on a newly created Linode vps running an Ubuntu 8.10 LAMP server with a freshly installed Drupal 6.9 (installed using cvs). After also installing Drush via cvs, I enabled all the Drush specific modules (excepting the 'simpletest' which I have not installed) and created the link as well as an alias as described in the docs, but when i run 'drush' at the command prompt, the result is '/usr/bin/env: php: No such file or directory'. If I navigate to the drush directory and attempt to run the cmd, I am still left with '/usr/bin/env: php: No such file or directory'.
I also tried logging out and back in... but issue remains.
Thanks
Comments
Comment #1
gregglesThis sounds like php is not in your $PATH variable. Try running "which php". You should get something like /usr/bin/php as the single response. If you get no data but only a new command prompt then that's an indication of an environment problem.
Comment #2
domesticat commentedHmm. I'm seeing something similar, I think. Installed via CVS. Created the required hard link. If I navigate to the directory and run
./drush.phpdrush works properly. If I navigate back to the web root and try to execute drush, here's what happens:which phpreturns/usr/bin/phpComment #3
kpm commentedOk, it looks like it is not in the path, when I run which php, nothing is returned. But I don't have any php files in /bin/... which is strange, it seems everyone else does... "whereis php" returns three directories /etc/php5, /usr/lib/php5, and /usr/share/php5 but If I attempt to run the drush.php from any of those directories, it still won't run.
Can anyone let me know how to get php into the system path? I know how to do it on Windows, but not Linux.
Thanks
Comment #4
kpm commentedI saw another post with the same problem I was having: http://drupal.org/node/328988
So I ran "apt-get install php5-cgi" then created the link, "ln /usr/bin/php5-cgi /usr/bin/php" and now drush.php runs, but the result is:
"drush.php is designed to run via the command line.Segmentation fault"
Not sure if I fixed something or broke something now...
Comment #5
kpm commentedOk, sorted it out... I was missing the php5-cli application. sigh.
Comment #6
jayb1 commentedThanks I was stuck on this issue for a few hours until I ran across this post...
Comment #7
quickcel commentedThanks - I was missing the php5-cli as well on my VPS...saved me a lot of time ;)
Comment #8
flashy commentedI am having the same issue - can someone please expand on how this was fixed? I am a semi newbie - php5-cli?
Comment #9
quickcel commentedIf you are having the same problem, then you can run:
sudo apt-get install php5-cliThis will install the php5-cli package, and hopefully fix your problem