Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install drush for Drupal 8.4 #3033

Closed
mh35 opened this issue Oct 8, 2017 · 15 comments
Closed

Cannot install drush for Drupal 8.4 #3033

mh35 opened this issue Oct 8, 2017 · 15 comments

Comments

@mh35
Copy link

mh35 commented Oct 8, 2017

I installed Drupal 8.4, but Composer said an error as below.

./composer.json has been updated
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
- drush/drush 8.1.0 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.1 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.2 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.3 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.4 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.5 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.6 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.7 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.8 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.9 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- Conclusion: don't install drush/drush 8.1.14
- Conclusion: don't install drush/drush 8.1.13
- Conclusion: don't install drush/drush 8.1.12
- Conclusion: don't install drush/drush 8.1.11
- Conclusion: don't install drush/drush 8.1.10
- Conclusion: don't install drush/drush 8.x-dev
- Installation request for drupal/drupal No version set (parsed as 1.0.0) -> satisfiable by drupal/drupal[No version set (parsed as 1.0.0)].
- Conclusion: remove symfony/console v3.2.8
- Installation request for symfony/dependency-injection (locked at v3.2.8, required as ~3.2.8) -> satisfiable by symfony/dependency-injection[v3.2.8].
- Installation request for drush/drush ^8.1 -> satisfiable by drush/drush[8.1.0, 8.1.1, 8.1.10, 8.1.11, 8.1.12, 8.1.13, 8.1.14, 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.8.x-dev, 8.x-dev].
- Conclusion: don't install symfony/console v3.2.8
- drush/drush 8.8.x-dev requires symfony/console ~2.7 -> satisfiable by symfony/console[2.7.x-dev, 2.8.x-dev].
- Can only install one of: symfony/console[2.7.x-dev, v3.2.8].
- Can only install one of: symfony/console[2.8.x-dev, v3.2.8].
- Installation request for symfony/console (locked at v3.2.8, required as ~3.2.8) -> satisfiable by symfony/console[v3.2.8].

Installation failed, reverting ./composer.json to its original content.

Maybe Drush has some dependency conflicts, so please check them.

@greg-1-anderson
Copy link
Member

Try installing with 8.x-dev. We will tag a 8.1.15 release to fix this; would be helpful if some folks would help test.

@Matombo
Copy link

Matombo commented Oct 8, 2017

installing 8.x-dev fails too

$ composer require drush/drush 8.x-dev
./composer.json has been updated
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 8.x-dev -> satisfiable by drush/drush[8.x-dev].
    - Conclusion: remove symfony/dependency-injection v3.2.8
    - Conclusion: don't install symfony/dependency-injection v3.2.8
    - drush/drush 8.x-dev requires symfony/yaml ~2.3 -> satisfiable by symfony/yaml[2.3.x-dev, 2.4.x-dev, 2.5.x-dev, 2.6.x-dev, 2.7.x-dev, 2.8.x-dev].
    - symfony/yaml 2.3.x-dev conflicts with symfony/dependency-injection[v3.2.8].
    - symfony/yaml 2.4.x-dev conflicts with symfony/dependency-injection[v3.2.8].
    - symfony/yaml 2.5.x-dev conflicts with symfony/dependency-injection[v3.2.8].
    - symfony/yaml 2.6.x-dev conflicts with symfony/dependency-injection[v3.2.8].
    - symfony/yaml 2.7.x-dev conflicts with symfony/dependency-injection[v3.2.8].
    - symfony/yaml 2.8.x-dev conflicts with symfony/dependency-injection[v3.2.8].
    - Installation request for symfony/dependency-injection (locked at v3.2.8, required as ~3.2.8) -> satisfiable by symfony/dependency-injection[v3.2.8].


Installation failed, reverting ./composer.json to its original content.

@greg-1-anderson
Copy link
Member

Looks like we need to let the version of symfony/yml float now too.

@ergophobe
Copy link

ergophobe commented Oct 8, 2017

Same issue. I had installed Drush 8.1.14 as mentioned in the Drupal 8.4 release docs, but that did not work because of the dependency conflicts mentioned above.

I installed Drush 9.x and that was fine.

Er... fine for Drupal 8.4. The drush install had issues, but that's a separate concern.

So what I meant to say by "fine" was it solved the dependency problem once I explicitly asked for compatible versions of symfony, drush and Drupal:

composer update --with-dependencies symfony/class-loader:~3.2.8 drupal/core:~8.4 drush/drush:~9.@dev

@greg-1-anderson
Copy link
Member

I made another change to the composer.json file in the Drush 8.x dev branch, and after that was able to composer install Drupal 8.4.0 with Drush 8.x-dev.

@grasmash
Copy link
Contributor

grasmash commented Oct 9, 2017

I was also able to: acquia/blt#2107

@ultimike
Copy link

ultimike commented Oct 9, 2017

I'm still unable to install Drush with Drupal core 8.4.0. Here's what I've done...

  1. I was at Drupal core 8.3.7 and Drush 8.1.12.
  2. I initially tried to do a composer update drupal/core --with-dependencies and was denied due to the previously well documented conflicts/changes symfony component version updates.
  3. I then removed Drush using composer remove drush/drush
  4. I tried updating Drupal core using Composer again, but kept getting conflicts. On a suggestion from @greg-1-anderson in Slack (thanks!) I deleted my composer.lock and entire /vendor directory and did a composer update (proceed with caution!) - this successfully updated Drupal core to 8.4.
  5. Again, on a suggestion from @greg-1-anderson I waited a few days to try to reinstall Drush - he indicated he was working on a new Drush release to help solve the issue.
  6. This morning, I tried composer require drush/drush --prefer-dist - I received the Your requirements could not be resolved to an installable set of packages. message (it was clear Composer was only trying to install an 8.x version of Drush).
  7. I then tried composer require drush/drush:9.x --prefer-dist - I received the same message, but with different conflicts.
  8. Based on the above thread, I tried composer require drush/drush:8.x-dev - still no luck. Screenshot attached.

require_drush

Not sure how to proceed at this point...

thanks,
-mike

@greg-1-anderson
Copy link
Member

reflection-dockblock can be a problem. We only support version 2 and 3 in annotated command. I want to stop using this component in Drush & c. completely.

Try composer why phpdocumentor/reflection-docblock. You might be successful if you uninstall the component that depends on that, then install Drush, then put back the other component.

We'll work on making this better.

@ultimike
Copy link

ultimike commented Oct 9, 2017

@greg-1-anderson thanks for the info.

I tracked the phpdocumentor/reflection-docblock dependency to phpunit/phpunit. I tried running composer update phpunit/phpunit --with-dependencies, but no update was available.

So, I did a composer remove phpunit/phpunit (I'm not using it) and then tried installing Drush via composer require drush/drush:8.x-dev - with success! One thing I did notice is that when I removed phpunit, it also (correctly) removed phpdocumentor/reflection-docblock version 4.1.1 and then when I installed drush/drush, it added phpdocumentor/reflection-docblock version 2.0.5.

I then tested my local by running a few drush commands and all appears to be working (phew!)

Next, I tried re-adding phpunit/phpunit with composer require phpunit/phpunit --dev --prefer-dist and it appears that version 6.4.1 was installed (I believe the previous version was 4.something - will this be an issue?)

So, at this point, I think all is well. Should I be on the lookout for a Drush 8.x or 9.x release to update to?

thanks,
-mike

@grasmash
Copy link
Contributor

grasmash commented Oct 9, 2017

Try composer require drush/drush:8.x-dev --no-update && composer update.

As @greg-1-anderson indicated with his suggestion to remove composer.lock and vendor, composer update vendor/package --with-dependencies can be insufficient.

@ergophobe
Copy link

@greg-1-anderson: "We only support version 2 and 3 in annotated command"

Actually, I ran into the reflection-docblock issues as well and noticed that in fact in phpunit and annotated-command it allows:

"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0"

Only the direct dependency on reflection-docblock in drush is defined as
"phpdocumentor/reflection-docblock": "^2.0"

This actually resulted in a couple more rounds of remove/require/update to deal with, but if drush had the same dependency definintion as annotated-command and phpunit, this would have worked for me with a lot less hassle.

I didn't mention it above because I wanted to run a test first to see whether reflection-docblock 4 worked with drush. If it does, could we just have the same requirements across the board?

@ultimike - that's basically what I did except

After this: composer update --with-dependencies symfony/class-loader:~3.2.8 drupal/core:~8.4 drush/drush:~9.@dev

Everything worked except drush which needed the patch 494f11a from #2912

I think I went overboard in terms of what I was deleting and removing, but was trying to get unstuck.

My issue with reflection-docblock started because at one point I tried composer update --with-dependencies which moved all sorts of things to the highest allowed versions at the time (and without drush required, that meant 4.x)

@MPParsley
Copy link
Contributor

In my case another project had locked a too high version of phpdocumentor/reflection-docblock but drush ~8.1.12 only accepts ~2.0.0
- Installation request for phpdocumentor/reflection-docblock (locked at 3.2.2) -> satisfiable by phpdocumentor/reflection-docblock[3.2.2].

Fixed with:

  • composer require phpdocumentor/reflection-docblock:~2.0.0
  • composer require drush/drush:~8.1.12 --dev

@Matombo
Copy link

Matombo commented Nov 9, 2017

Similar issue with drupal 8.4.1:

$ composer require drush/drush
Using version ^8.1 for drush/drush
./composer.json has been updated
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
- drush/drush 8.1.0 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.1 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.2 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.3 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.4 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.5 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.6 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.7 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.8 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- drush/drush 8.1.9 conflicts with drupal/drupal[No version set (parsed as 1.0.0)].
- Conclusion: don't install drush/drush 8.1.15
- Conclusion: don't install drush/drush 8.1.14
- Conclusion: don't install drush/drush 8.1.13
- Conclusion: don't install drush/drush 8.1.12
- Conclusion: don't install drush/drush 8.1.11
- Conclusion: don't install drush/drush 8.1.10
- Conclusion: don't install drush/drush 8.x-dev
- Installation request for drupal/drupal No version set (parsed as 1.0.0) -> satisfiable by drupal/drupal[No version set (parsed as 1.0.0)].
- Conclusion: remove symfony/console v3.2.13
- Installation request for phpdocumentor/reflection-docblock (locked at 4.1.1) -> satisfiable by phpdocumentor/reflection-docblock[4.1.1].
- Installation request for drush/drush ^8.1 -> satisfiable by drush/drush[8.1.0, 8.1.1, 8.1.10, 8.1.11, 8.1.12, 8.1.13, 8.1.14, 8.1.15, 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.8.x-dev, 8.x-dev].
- Conclusion: don't install symfony/console v3.2.13
- drush/drush 8.8.x-dev requires symfony/console ~2.7 -> satisfiable by symfony/console[2.7.x-dev, 2.8.x-dev].
- Can only install one of: symfony/console[2.7.x-dev, v3.2.13].
- Can only install one of: symfony/console[2.8.x-dev, v3.2.13].
- Installation request for symfony/console (locked at v3.2.13, required as ~3.2.8) -> satisfiable by symfony/console[v3.2.13].

$ composer require drush/drush 8.x-dev
./composer.json has been updated
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 8.x-dev -> satisfiable by drush/drush[8.x-dev].
- Conclusion: remove phpdocumentor/reflection-docblock 4.1.1
- Conclusion: don't install phpdocumentor/reflection-docblock 4.1.1
- drush/drush 8.x-dev requires phpdocumentor/reflection-docblock ^2.0 -> satisfiable by phpdocumentor/reflection-docblock[2.0.0, 2.0.0a1, 2.0.0a2, 2.0.0a3, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.0, 4.1.1].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.0a1, 4.1.1].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.0a2, 4.1.1].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.0a3, 4.1.1].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.1, 4.1.1].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.2, 4.1.1].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.3, 4.1.1].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.4, 4.1.1].
- Can only install one of: phpdocumentor/reflection-docblock[2.0.5, 4.1.1].
- Installation request for phpdocumentor/reflection-docblock (locked at 4.1.1) -> satisfiable by phpdocumentor/reflection-docblock[4.1.1].

@greg-1-anderson
Copy link
Member

Try again with 8.x-dev now that #3157 has been merged. If that works, we can make a new tagged release.

If that does not work, try removing composer.lock and vendor and try again with 8.x-dev.

@Matombo
Copy link

Matombo commented Nov 9, 2017

it works, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants