Installing Drupal Console with drupal 8.8.x or 8.9.x fails

Jun
2020
22

I tried to use the default composer command for installing the drupal console cli (https://drupalconsole.com/docs/en/getting/composer) but with no luck.

composer require drupal/console:~1.0 \
--prefer-dist \
--optimize-autoloader

No matter what i kept receiving this error.

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

  Problem 1
    - drupal/console 1.0.0-rc9 requires symfony/css-selector ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc8 requires symfony/css-selector ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc7 requires symfony/css-selector ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc6 requires symfony/css-selector ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc5 requires symfony/css-selector ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc4 requires symfony/css-selector ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc3 requires symfony/css-selector ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc25 requires symfony/expression-language ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc24 requires symfony/expression-language ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc23 requires symfony/expression-language ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc22 requires symfony/expression-language ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc21 requires symfony/css-selector >=2.7 <3.0 -> no matching package found.
    - drupal/console 1.0.0-rc20 requires symfony/css-selector >=2.7 <3.0 -> no matching package found.
    - drupal/console 1.0.0-rc2 requires symfony/css-selector ~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc19 requires symfony/css-selector >=2.7 <3.0 -> no matching package found.
    - drupal/console 1.0.0-rc18 requires symfony/css-selector >=2.7 <3.0 -> no matching package found.
    - drupal/console 1.0.0-rc17 requires symfony/css-selector >=2.7 <3.0 -> no matching package found.
    - drupal/console 1.0.0-rc16 requires symfony/css-selector >=2.7 <3.0 -> no matching package found.
    - drupal/console 1.0.0-rc15 requires symfony/css-selector >=2.7 <3.0 -> no matching package found.
    - drupal/console 1.0.0-rc14 requires symfony/css-selector >=2.7 <3.2 -> no matching package found.
    - drupal/console 1.0.0-rc13 requires symfony/css-selector >=2.7 <3.2 -> no matching package found.
    - drupal/console 1.0.0-rc12 requires symfony/css-selector >=2.7 <3.2 -> no matching package found.
    - drupal/console 1.0.0-rc11 requires symfony/css-selector >=2.7 <3.2 -> no matching package found.
    - drupal/console 1.0.0-rc10 requires symfony/css-selector ~2.7|~2.8 -> no matching package found.
    - drupal/console 1.0.0-rc1 requires symfony/css-selector ~2.8 -> no matching package found.
    - drupal/console 1.0.0-beta5 requires symfony/config ~2.8 -> no matching package found.
    - drupal/console 1.0.0-beta4 requires symfony/config ~2.8 -> no matching package found.
    - drupal/console 1.0.0-beta3 requires symfony/config ~2.8 -> no matching package found.
    - drupal/console 1.0.0-beta2 requires symfony/config ~2.8 -> no matching package found.
    - drupal/console 1.0.0-beta1 requires symfony/config ~2.8 -> no matching package found.
    - drupal/console 1.0.0-alpha2 requires symfony/config ~2.8 -> no matching package found.
    - drupal/console 1.0.0-alpha1 requires symfony/config ~2.8 -> no matching package found.
    - drupal/console 1.9.4 requires drupal/console-core 1.9.4 -> satisfiable by drupal/console-core[1.9.4].
    - Conclusion: don't install drupal/console-core 1.9.4
    - drupal/console 1.9.3 requires drupal/console-core 1.9.3 -> satisfiable by drupal/console-core[1.9.3].
    - Conclusion: don't install drupal/console-core 1.9.3
    - drupal/console 1.9.2 requires drupal/console-core 1.9.2 -> satisfiable by drupal/console-core[1.9.2].
    - Conclusion: don't install drupal/console-core 1.9.2
    - drupal/console 1.9.1 requires drupal/console-core 1.9.1 -> satisfiable by drupal/console-core[1.9.1].
    - Conclusion: don't install drupal/console-core 1.9.1
    - Installation request for symfony/filesystem (locked at v4.4.10) -> satisfiable by symfony/filesystem[v4.4.10].
    - drupal/console v1.9.0 requires drupal/console-core 1.9.0 -> satisfiable by drupal/console-core[v1.9.0].
    - Conclusion: don't install drupal/console-core v1.9.0
    - drupal/console 1.0.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.0.0-rc26 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.0.1 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.0.2 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.1.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.1.1 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.2.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.3.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.3.1 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.3.2 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.4.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.5.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.6.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.6.1 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.7.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - drupal/console 1.8.0 requires alchemy/zippy 0.4.3 -> satisfiable by alchemy/zippy[0.4.3].
    - Conclusion: don't install alchemy/zippy 0.4.3
    - Installation request for drupal/console ~1.0 -> satisfiable by drupal/console[1.0.0, 1.0.0-alpha1, 1.0.0-alpha2, 1.0.0-beta1, 1.0.0-beta2, 1.0.0-beta3, 1.0.0-beta4, 1.0.0-beta5, 1.0.0-rc1, 1.0.0-rc10, 1.0.0-rc11, 1.0.0-rc12, 1.0.0-rc13, 1.0.0-rc14, 1.0.0-rc15, 1.0.0-rc16, 1.0.0-rc17, 1.0.0-rc18, 1.0.0-rc19, 1.0.0-rc2, 1.0.0-rc20, 1.0.0-rc21, 1.0.0-rc22, 1.0.0-rc23, 1.0.0-rc24, 1.0.0-rc25, 1.0.0-rc26, 1.0.0-rc3, 1.0.0-rc4, 1.0.0-rc5, 1.0.0-rc6, 1.0.0-rc7, 1.0.0-rc8, 1.0.0-rc9, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, v1.9.0].

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.
After searching a little i found this post at github https://github.com/hechoendrupal/drupal-console/issues/3885 and the comment that helped me was the one of " nidash ". So what i did was to update my web/composer.json file by adding to the require section this
"require": {
. . . .
      "drupal/console": "~1.0"
    },
and then running composer update
Tags: 
Cats: 
this is an arrow pointing back to the top of the page