seanbuscay / drupal-server

Shell scripts to setup a Ubuntu server to test Drupal.
3 stars 1 forks source link

Drush status error #2

Open stevector opened 11 years ago

stevector commented 11 years ago

After running the install steps on a vagrant ubuntu 12.04 box I am getting this error:

vagrant@precise64:~$ drush status
PHP:  syntax error, unexpected END_OF_LINE, expecting '=' in /etc/php5/cli/conf.d/xhprof.ini on line 3
Drush needs to download a library from                               [error]
http://download.pear.php.net/package/Console_Table-1.1.3.tgz in order
to function, and the attempt to download this file automatically
failed because you do not have permission to write to the library
directory /usr/share/php/drush/lib. To continue you will need to
manually download the package from
http://download.pear.php.net/package/Console_Table-1.1.3.tgz, extract
it, and copy the directory into your /usr/share/php/drush/lib
directory.
seanbuscay commented 11 years ago

Hi Steve.

There may be two errors here.

One for the xhprof.ini entry and one for the Drush Console Table package install.

Let's start with the Drush install issue.

Right now, the error suggests permission has not been granted to the created directory. We can try setting permissions after testing the following.

Since you are on Ubuntu, please run the following to install it via the Debian package:

sudo apt-get install drush
sudo drush dl drush --destination='/usr/share'

Then run:

drush --version

To confirm you are on a Drush 5 branch.

Note in the install commands you are actually installing version 4 via the Debian package manager and then updating to version 5 via the drush dl command.

If that does not work, make the following directory if it does not already exist:

/usr/share/php/drush/lib

Then check permissions on the directory to make sure you can write to it.

Then run:

sudo pear upgrade --force Console_Getopt
sudo pear upgrade --force pear
sudo pear upgrade-all
sudo pear channel-discover pear.drush.org
sudo pear install drush/drush

Please let me know how it went.

arthur24b6 commented 11 years ago

Just extract http://download.pear.php.net/package/Console_Table-1.1.3.tgz into /usr/share/php/drush/lib which should solve the issue.

seanbuscay commented 11 years ago

Thanks @arthur24b6