churchofchai

a view into the sordid life i lead

Saturday, March 06, 2010

Installing Drush on Macports

Getting drush (the Drupal shell) to work on macports is a bit of a pain due to the php5/php52 conflict issue. Here's what I had to go through to get it to work:

$ sudo port install drush
--->  Computing dependencies for drushError: Unable to execute port: Can't install php52 because conflicting ports are installed: php5
Before reporting a bug, first run the command again with the -d flag to get complete output.
$ sudo port deactivate php5
$ sudo port install drush
$ sudo port deactivate php52
$ sudo port activate php5
$ sudo pear install Console_Table-1.1.3
$ drush

Xdebug requires Zend Engine API version 220090115.
The Zend Engine API version 220090626 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org for a later version of Xdebug.

/opt/local/libexec/drush/includes/table.inc: Permission denied
Drush needs a copy of the PEAR Console_Table library in order to     [error]
function, and the attempt to download this file automatically failed.
To continue you will need to download the 1.1.3 package from
http://pear.php.net/package/Console_Table, extract it, and copy the
Table.php file into Drush's directory as
/opt/local/libexec/drush/includes/table.inc.
Drush could not execute.                                             [error]

$  sudo cp /opt/local/PEAR/Console/Table.php /opt/local/libexec/drush/includes/table.inc
$ drush