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

pear/console_table (locked at v1.3.0) blocks cgr installation of Drush 8.3.0 #39

Open
UTANdev opened this issue Aug 8, 2020 · 1 comment

Comments

@UTANdev
Copy link

UTANdev commented Aug 8, 2020

I can't install Drush 8 with cgr and am having trouble determining which project is forcing the lock which makes the Drush dependency fail.

monkey@Sonic ~/.composer $ cgr drush/drush 8.3.0
>> Running: composer '--working-dir=/home/monkey/.composer/global/drush/drush' require 'drush/drush:8.3.0'
Cannot create cache directory /home/monkey/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/monkey/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/monkey/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
./composer.json has been updated
Cannot create cache directory /home/monkey/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/monkey/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/monkey/.composer/cache/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
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
    - Can only install one of: pear/console_table[v1.3.1, v1.3.0].
    - Can only install one of: pear/console_table[v1.3.1, v1.3.0].
    - Can only install one of: pear/console_table[v1.3.1, v1.3.0].
    - drush/drush 8.3.0 requires pear/console_table ~1.3.1 -> satisfiable by pear/console_table[v1.3.1].
    - Installation request for drush/drush 8.3.0 -> satisfiable by drush/drush[8.3.0].
    - Installation request for pear/console_table (locked at v1.3.0) -> satisfiable by pear/console_table[v1.3.0].


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

I was unable to determine which project outside Drush requires pear/console_table 1.3.0:

monkey@Sonic ~/.composer $ grep -R --include="composer.json" "pear/console_table" ~
/home/monkey/.config/composer/vendor/pear/console_table/composer.json:    "name": "pear/console_table",
/home/monkey/.composer/global/drush/drush/vendor/pear/console_table/composer.json:    "name": "pear/console_table",
/home/monkey/.composer/global/drush/drush/vendor/drush/drush/composer.json:    "pear/console_table": "~1.3.0",
grep: /home/monkey/.cache/dconf: Permission denied
grep: warning: /home/monkey/tmp/ansible/test/utils/ansible-playbook_integration_runner/roles/ansible_test_deps/test/roles/ansible_test_deps: recursive directory loop

And yes, some /.composer directories are owned by root:

monkey@Sonic ~/.composer $ ls -al /home/monkey/.composer
total 1724
drwxr-xr-x  5 monkey root      4096 Aug  7 21:37 .
drwxr-xr-x 59 monkey monkey    4096 Aug  7 21:33 ..
-rw-rw-r--  1 monkey monkey 1704783 Aug  7 21:35 2016-09-12_11-27-19-1.2.1-old.phar
-rw-------  1 monkey monkey     142 Aug  7 21:37 auth.json
drwxr-xr-x  4 root   root      4096 Aug  7 21:35 cache
-rw-rw-r--  1 monkey monkey      95 Aug  7 20:33 composer.json
-rw-rw-r--  1 monkey monkey    9585 Aug  7 20:33 composer.lock
-rw-------  1 monkey monkey      21 Aug  7 21:37 config.json
drwxrwxr-x  3 monkey monkey    4096 Oct 19  2016 global
-rw-rw-r--  1 monkey monkey      13 Oct 19  2016 .htaccess
-rw-r--r--  1 root   root       799 Oct 19  2016 keys.dev.pub
-rw-r--r--  1 root   root       799 Oct 19  2016 keys.tags.pub
drwxrwxr-x  8 monkey monkey    4096 Aug  7 20:33 vendor

How can I resolve this version lock issue and install Drush?

@greg-1-anderson
Copy link
Member

cgr drush/drush 8.3.0 works for me. You do, however, probably want Drush 8.4.0, as it supports contrib modules with semver releases, and earlier versions do not.

Anyway, it seems like your problem was caused by composer global require pear/console_table, or some other global require that included pear/console_table. Maybe you did a global require of an older version of Drush?

Clear out your global vendor directory and start again. Don't use composer global require for anything except for Composer plugins that you really do want to install globally. Be conservative about even this, though.

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

2 participants