I'm running FreeBSD 10 with PHP5.3.28

I can't use the port or package to install Drush because it will install the default PHP (5.4) as a dependency. So I installed Drush manually. Then when I invoked Drush it said:

Can't find PHP

So I added this to csh.cshrc: setenv DRUSH_PHP /usr/local/bin/php

After reboot I now get this:

Could not open input file: @pear_directory@/drush/drush.php

I don't have PEAR on my system and trying to install it also means it will install PHP5.4. I was able to install Composer manually but I'm afraid it too will install PHP5.4 as a dependency for Drush.

Any ideas?

Note: php -i works.

  • Could you please add some formatting to your post? Like, csh.cshrc code in a code block, messages in quote blocks and so on? Now it's pretty hard to read.
    – Mołot
    Jun 4, 2014 at 6:43
  • And php CLI works fine on its own? php -i from the command line gives you what you'd expect?
    – Clive
    Jun 4, 2014 at 10:02
  • This crappy editor doesn't format carriage returns - that's why it looks bad. Markdown is annoying - should just have a WYSIWYG. Yes, php -i works.
    – user25265
    Jun 5, 2014 at 1:50

2 Answers 2


composer install will not install php; go ahead and follow the instructions in the Drush README for the composer install, and you should be fine.

Note also that Drush master (Drush 7) will soon require php 5.4, so you should use Drush 6 if you'd like to stick with php 5.3.

I don't have a FreeBSD system to try this on, but composer global require drush/drush:6.* works fine on my Linux box. If you have problems with the composer install, you might want to try composer self-update, to insure that you have a recent version; I can't imagine why FreeBSD should be different than Linux when finding and installing Drush.

  • Composer didn't work. From what directory should it be invoked? Where will it put Drush? FreeBSD puts it in /usr/local/share/drush/ # composer global require drush/drush:6.* composer: No match.
    – user25265
    Jun 5, 2014 at 1:47
  • 1
    BTW, I wish the issue queue had been left at D.O It's hard to keep track of anything on this site and now I have to search two places for issues.
    – user25265
    Jun 5, 2014 at 1:53

Not sure why Composer failed...

Resorted to Pear which worked. Pear isn't automatically included with PHP built from FreeBSD ports, so first had to:

# wget http://pear.php.net/go-pear.phar
# php go-pear.phar


pear channel-discover pear.drush.org
pear install drush/drush

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.