0

I am having issues installing Drush on Mac OSX 10.9.5. I have tried a variety of methods. The most successful have been;

Using homebrew

Drush 7 using composer

Each method had produced a version of Drush, however each appears old and drush dl drupal downloads the 6.x version, as does drush dl drupal 7.x.

Can you please suggest:

1) How to ensure old versions of drush are removed to ensure that a new installation goes smoothly.

2) The recommended method for installing the latest stable Drush version on Mac OSX 10.9.5

I had tried to delete the old drush version manually by removing folders. Now the composer installation method seems to fail as I get:

Pauls-iMac:~ Trotter$ composer global require drush/drush:dev-master
Changed current directory to /Users/Trotter/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing drush/drush (dev-master 78b1538)
    Cloning 78b15385ba97890dc3431790494f26d6be99ede9
    Failed to download drush/drush from source: The process "git clone --no-checkout 'git://github.com/drush-ops/drush.git' '/Users/Trotter/.composer/vendor/drush/drush' && cd '/Users/Trotter/.composer/vendor/drush/drush' && git remote add composer 'git://github.com/drush-ops/drush.git' && git fetch composer" exceeded the timeout of 300 seconds.
    Now trying to download from dist
  - Installing drush/drush (dev-master 78b1538)
    Loading from cache

    Skipped installation of bin drush for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.php for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.bat for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.complete.sh for package drush/drush: name conflicts with an existing file

I can see that I don't have drush installed as what drush gives No such file or directory and drush info gives -bash: drush: command not found

  • Which drush not what drush. Try uninstalling drush via composer.json first drupal.stackexchange.com/questions/135599/… – Queenvictoria Mar 17 '15 at 12:40
  • Do you have write permission to your ~/.composer directory? – Queenvictoria Mar 17 '15 at 12:42
  • Actually it looks like the ssh command to github is timing out. I had this issue on Yosemite. You might need to flush the DNS cache. What fixed it in the end for me was a p-ram reset. Reboot with command, option, P and R keys held down until you hear the chime a couple of times. – Queenvictoria Mar 17 '15 at 12:44
1

Drush 7.x doesn't only download Drupal 7 of course. Drush 5 will download Drupal 7 too. Drush 7 is required for Drupal 8 and needs to be selected when installing with composer global require drush/drush:dev-master. Ps the recommended method is the composer method. This what I use on OS X 10.9.

Find old versions of drush with which drush. Check where they live withls -l [path from which drush]. Rinse and repeat until the only one left is in your home folder inside the hidden composer directory.

Check the version of the installed drush with drush --version

Make sure you don't have a .drushrc somewhere with a default core version specified.

  • Thanks for all of your helpful suggestions Queenvictoria. I tried the RAM set. I I have managed to remove a 'require dev' dependancy that composer seemed to have (I noticed Updating dependencies (including require-dev) when updating in composer). After doing that I was able to download Drush 6 with composer. This install of Drush was able to download D7 using drush dl drupal-7.x – Paul Trotter Mar 23 '15 at 16:34
0

Skipped installation of bin drush for package drush/drush: name conflicts with an existing file

Make sure to unset COMPOSER_BIN_DIR shell variable before running Composer command as it may conflict with bin-dir defined in your composer.json file. To check your current value of bin-dir, run composer config bin-dir (where your Drush may be present).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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