1

I've been struggling for a few days getting drush to install properly on my Mac.

I've followed the instructions on https://www.drupal.org/node/1674222

Composer installs fine, but when I cd into drush-master and run composer install, I get:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for drush/drush No version set (parsed as 1.0.0) -> satisfiable by drush/drush[No version set (parsed as 1.0.0)].
    - drupal/core 8.0.0-beta9 requires phpunit/phpunit 4.4.* -> satisfiable by phpunit/phpunit[4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5] but these conflict with your requirements or minimum-stability.
    - drupal/core 8.0.0-beta8 requires phpunit/phpunit 4.4.* -> satisfiable by phpunit/phpunit[4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5] but these conflict with your requirements or minimum-stability.
    - drupal/core 8.0.0-beta7 requires phpunit/phpunit 4.4.* -> satisfiable by phpunit/phpunit[4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5] but these conflict with your requirements or minimum-stability.
    - drupal/core 8.0.0-beta6 requires phpunit/phpunit 4.4.* -> satisfiable by phpunit/phpunit[4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5] but these conflict with your requirements or minimum-stability.
    - drupal/core 8.0.0-beta15 requires phpunit/phpunit 4.6.* -> satisfiable by phpunit/phpunit[4.6.0, 4.6.1, 4.6.10, 4.6.2, 4.6.3, 4.6.4, 4.6.5, 4.6.6, 4.6.7, 4.6.8, 4.6.9] but these conflict with your requirements or minimum-stability.
    - drupal/core 8.0.0-beta14 requires phpunit/phpunit 4.6.* -> satisfiable by phpunit/phpunit[4.6.0, 4.6.1, 4.6.10, 4.6.2, 4.6.3, 4.6.4, 4.6.5, 4.6.6, 4.6.7, 4.6.8, 4.6.9] but these conflict with your requirements or minimum-stability.
    - drupal/core 8.0.0-beta13 requires phpunit/phpunit 4.6.* -> satisfiable by phpunit/phpunit[4.6.0, 4.6.1, 4.6.10, 4.6.2, 4.6.3, 4.6.4, 4.6.5, 4.6.6, 4.6.7, 4.6.8, 4.6.9] but these conflict with your requirements or minimum-stability.
    - drupal/core 8.0.0-beta12 requires phpunit/phpunit 4.6.* -> satisfiable by phpunit/phpunit[4.6.0, 4.6.1, 4.6.10, 4.6.2, 4.6.3, 4.6.4, 4.6.5, 4.6.6, 4.6.7, 4.6.8, 4.6.9] but these conflict with your requirements or minimum-stability.
    - drupal/core 8.0.0-beta11 requires phpunit/phpunit 4.6.* -> satisfiable by phpunit/phpunit[4.6.0, 4.6.1, 4.6.10, 4.6.2, 4.6.3, 4.6.4, 4.6.5, 4.6.6, 4.6.7, 4.6.8, 4.6.9] but these conflict with your requirements or minimum-stability.
    - drupal/core 8.0.0-beta10 requires phpunit/phpunit 4.4.* -> satisfiable by phpunit/phpunit[4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5] but these conflict with your requirements or minimum-stability.
    - Installation request for webflo/drupal-core-strict 8.6.x-dev -> satisfiable by webflo/drupal-core-strict[8.6.x-dev].
    - drupal/alinks 1.0.0 requires drupal/core * -> satisfiable by drupal/core[8.0.0, 8.0.0-beta10, 8.0.0-beta11, 8.0.0-beta12, 8.0.0-beta13, 8.0.0-beta14, 8.0.0-beta15, 8.0.0-beta16, 8.0.0-beta6, 8.0.0-beta7, 8.0.0-beta8, 8.0.0-beta9, 8.0.0-rc1, 8.0.0-rc2, 8.0.0-rc3, 8.0.0-rc4, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.0.5, 8.0.6, 8.0.x-dev, 8.1.0, 8.1.0-beta1, 8.1.0-beta2, 8.1.0-rc1, 8.1.1, 8.1.10, 8.1.2, 8.1.3, 8.1.4, 8.1.5, 8.1.6, 8.1.7, 8.1.8, 8.1.9, 8.1.x-dev, 8.2.0, 8.2.0-beta1, 8.2.0-beta2, 8.2.0-beta3, 8.2.0-rc1, 8.2.0-rc2, 8.2.1, 8.2.2, 8.2.3, 8.2.4, 8.2.5, 8.2.6, 8.2.7, 8.2.8, 8.2.x-dev, 8.3.0, 8.3.0-alpha1, 8.3.0-beta1, 8.3.0-rc1, 8.3.0-rc2, 8.3.1, 8.3.2, 8.3.3, 8.3.4, 8.3.5, 8.3.6, 8.3.7, 8.3.8, 8.3.9, 8.3.x-dev, 8.4.0, 8.4.0-alpha1, 8.4.0-beta1, 8.4.0-rc1, 8.4.0-rc2, 8.4.1, 8.4.2, 8.4.3, 8.4.4, 8.4.5, 8.4.6, 8.4.7, 8.4.8, 8.4.x-dev, 8.5.0, 8.5.0-alpha1, 8.5.0-beta1, 8.5.0-rc1, 8.5.1, 8.5.2, 8.5.3, 8.5.4, 8.5.5, 8.5.6, 8.5.7, 8.5.8, 8.5.x-dev, 8.6.0, 8.6.0-alpha1, 8.6.0-beta1, 8.6.0-beta2, 8.6.0-rc1, 8.6.1, 8.6.2, 8.6.3, 8.6.x-dev, 8.7.x-dev].

etc...

Can someone tell me how to do this right?

2

Drush 9 only supports one install method. It requires that your Drupal 8 site be built with Composer and Drush be listed as a dependency.


See http://docs.drush.org/en/master/install/

There it's recommended you start your Drupal 8 project with Composer. Then add Drush as local dependency to your project and use this local Drush to do things.

$ cd drupal
$ composer require drush/drush
$ vendor/bin/drush cr

Using the Composer template for Drupal projects Drush already is listed as a dependency.

$ cd ~/Sites
$ composer create-project drupal-composer/drupal-project:8.x-dev some-dir --stability dev --no-interaction
$ cd some-dir
$ cd web
$ ../vendor/bin drush si

Additionally you then can install the Drush Launcher which will replace the global drush command with a wrapper that always automatically finds and executes the local Drush in every directory.


If all of this is no option for you you might want to have a look at Having multiple Drush instances for different core versions where I show how you'd still be able to install a global Drush quite easily.

  • I got drush working in the way you outline above (with drush-launcher), but I also need a "global" install, one of the reasons being our devs use different site aliases. I'll take a look at your link. – Pim Nov 23 '18 at 14:11
  • 2
    You should add site alias files into the project and not have them live globally. Devs can also add their own site alias files and have them in gitignore so they don’t conflict. – Kevin Nov 23 '18 at 14:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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