Trying to install Drush using Composer, i get an error concerning consolidation/annotated-command. What does it mean "locked at 2.0.3" and "requires 2.8.1"?

This is the error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1

- Installation request for drush/drush dev-master -> satisfiable by drush/drush[dev-master].
- Conclusion: remove consolidation/annotated-command 2.0.3
- Conclusion: don't install consolidation/annotated-command 2.0.3
- drush/drush dev-master requires consolidation/annotated-command ^2.8.1 -> satisfiable by consolidation/annotated-command[2.8.1, 2.8.2].
- Can only install one of: consolidation/annotated-command[2.8.1, 2.0.3].
- Can only install one of: consolidation/annotated-command[2.8.2, 2.0.3].
- Installation request for consolidation/annotated-command (locked at 2.0.3) -> satisfiable by consolidation/annotated-command[2.0.3].

Installation failed, reverting ./composer.json to its original content.
  • 2
    You have something already installed that’s locked to a version of a dependency that drush needs a more recent version of. See what’s in your global composer file
    – Clive
    Feb 8, 2018 at 8:39
  • @Clive, thx for pointing me to composer.lock. But how to overcome this constraint? Composer info shows v2.8.1 for annotated-command.
    – MarkDQ
    Feb 9, 2018 at 10:15
  • You can't overcome the constraint, it's a hard constraint. You'll need to find the package that depends on the old version and remove/upgrade it. Try running composer prohibits consolidation/annotated-command 2.8.1, hopefully that'll give you some info to go on
    – Clive
    Feb 9, 2018 at 11:14
  • The command results in "no installed package depending on consolidation/annotated-command in versions not matching 2.8.1" When I changed to 2.0.3, the result is "__ root __ - requires consolidation/annotated-command (2.8.1)"
    – MarkDQ
    Feb 10, 2018 at 18:44

1 Answer 1


I get this error after changing the minimum version of drush/drush to ~9.0 in my composer.json and running composer update drush/drush afterwards.

I solved it by just executing composer require drush/drush:~9.0 which lead to the error message drush/drush 9.5.x-dev requires symfony/config ^3.4, so I had to execute composer require symfony/config:^3.4 before composer require drush/drush:~9.0 could be finished successful.

Don't know if this is the only way or best practice to solve such a dependency conflict but in short this worked for me:

  1. composer require symfony/config:^3.4
  2. composer require drush/drush:~9.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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