I've been bashing my head against the wall all day trying to figure out why Drush has suddenly stopped working.
I've re-installed via composer, tried different versions, always the same error.
If I type
which drush I get
/home/user/.composer/vendor/bin/drush which is correct.
If I type
sh -vx drush in an attempt to debug what's happening with the script, I get the following output:
#!/usr/bin/env sh # # This script is a simple wrapper that will run Drush with the most appropriate # php executable it can find. # # Solaris users: Add /usr/xpg4/bin to the head of your PATH # + : not found/.composer/vendor/bin/drush: 8: /home/user/.composer/vendor/bin/drush: # Get the absolute path of this executable SELF_DIRNAME="`dirname -- "$0"`" + dirname -- /home/user/.composer/vendor/bin/drush + SELF_DIRNAME=/home/user/.composer/vendor/bin SELF_PATH="`cd -P -- "$SELF_DIRNAME" && pwd -P`/`basename -- "$0"`" + cd -P -- /home/user/.composer/vendor/bin /home/user/.composer/vendor/bin/drush: 1: cd: can't cd to /home/user/.composer/vendor/bin + basename -- /home/user/.composer/vendor/bin/drush + SELF_PATH=/drush + : not found/.composer/vendor/bin/drush: 12: /home/user/.composer/vendor/bin/drush: # Decide if we are running a Unix shell on Windows if `which uname > /dev/null 2>&1`; then case "`uname -a`" in /home/user/.composer/vendor/bin/drush: 15: /home/user/.composer/vendor/bin/drush: Syntax error: word unexpected (expecting "in")
Ok, maybe something wonky is returned with
uname -a? The response from my server is:
Linux servername 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
There are no directory permission issues... everything is owned by the user. I'm at a complete loss. I've tried drush 5, 6, and 7 - same sort of error in each.
The server is running Ubuntu 12.04.2 LTS