Tag Archives: commandline

Problems installing Drush using Pear

I’ve been working with Drupal for going on five years now, and I love the thing. I’m generally so busy with work, that I don’t take the time to step back and learn new tools that don’t immediately apply to whatever problem is at hand. I need to get out of that bad habit. Drush is one of those tools which I should have started using long ago.

Anyway, today, I finally prioritized it. I ran into a cryptic error:

Could not rename /usr/bin/.tmpdrush to /usr/bin/drush copy(/usr/bin/drush): failed to open stream: No such file or directory

It turns out that this is an artifact of having tried to install drush previously and not finished the process. So, typing drush at the prompt failed, but there were drush fragments floating around on the server botching attempts to reinstall.

Hence, the solution is to destroy those blocking fragments:


sudo rm /usr/bin/drush
sudo pear install drush/drush
sudo drush --version

Thanks for ahwebd over at stackexchange for pointing me to the solution.