Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to install drush (Drupal Shell) with macports I get an error:

Error: Unable to execute port: Can't install php52 because conflicting ports are installed: php5 php5-gd php5-iconv php5-mbstring

There's only one blog I can find about a fix for this (here):

$ 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

However for me: sudo port deactivate php5 gives:

Error: port deactivate failed: Please uninstall the ports that depend on php5 first

Any other ideas?

...I'd prefer not to go the Homebrew route as everything else I have installed via Macports.

I believe the version of Drupal I need to use is 6, but sudo port install drush +drupal6 returned the same conflict as above.

share|improve this question

no need to go to Homebrow ...

To find the port depending on php5 , use port echo depends:php5.

This may be because of a leaf, try port echo leaves and if not necessary port uninstall leaves.

If all this did not solve your problem, You can try this :

sudo port uninstall php5
sudo port install php52
sudo port install drush

Otherwise try installing a variant of drushusing the following command :

sudo port install drush +drupal5 or sudo port install drush +drupal6.

share|improve this answer
Many thanks for your answer - I had a lot of leaves in my ports tree which I have uninstalled. Unfortunately this did not solve the issue deactivating the port. – benedict_w Jan 15 '13 at 15:09
The problem is I don't want to downgrade as I am on php 5.3 and need it for other projects. – benedict_w Jan 15 '13 at 15:10
You are interested in which Drupal version ? 5 or 6 ? – ALJI Mohamed Jan 15 '13 at 15:35
updated my solution, please consider faq – ALJI Mohamed Jan 15 '13 at 15:40
Doh! +drupal6 didn't work. Sorry I got excited and thought it had at first! I believe the project is Drupal6 but this is my first time setting it up. – benedict_w Jan 15 '13 at 15:58

My solution was to use the Pear channel:

pear channel-discover
pear install drush/drush
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.