Skip to content Skip to navigation

Drush PHP Error

Posted by: 

Note that this error only occurs on Leland servers, since the retirement of pubsw.

If you get an error like this when running any drush command:

php: error while loading shared libraries: cannot open shared object file: No such file or directory

Take a look at your ~/.cshrc file. In it, you will see a few lines like the following:

 if ( ! $?site_path ) then
    set site_path=( \
          /usr/local/bin /usr/sweet/bin /usr/bin \
          /usr/pubsw/bin /bin /usr/sbin /sbin /usr/proc/bin \


If /usr/bin is either missing or after /usr/pubsw/bin, you'll want to fix that, then logout and log back in.

(Thanks marco!)

Alternative Method

Running the following command will update your .cshrc file for you:


Note that the updaterc command will rename your existing .cshrc file to .cshrc.old.

(Thanks Sharon!)