1

I am installing CiviCRM on a new server, new Drupal 10. Per instructions, I ran the following commands:

cd /var/www/drupal
composer require civicrm/civicrm-{core,packages,drupal-8}
composer require civicrm/cv -W

Also tried per this post

composer config minimum-stability dev
composer require 'drush/drush:12.*'

Got the following error:

 Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - civicrm/cv dev-master requires symfony/process ^4 -> found symfony/process[v4.0.0-BETA1, ..., 4.4.x-dev] but these were not loaded, likely because it conflicts with another require.
    - civicrm/cv[v0.1.0, ..., v0.1.1] require symfony/console ~2.3 -> found symfony/console[v2.3.0, ..., 2.8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - civicrm/cv[v0.1.2, ..., v0.2.1] require symfony/console ~2.8 -> found symfony/console[v2.8.0-BETA1, ..., 2.8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - civicrm/cv[dev-colemanw-patch-1, v0.2.2, ..., v0.3.13] require symfony/console ~2.8|^3 -> found symfony/console[v2.8.0-BETA1, ..., 2.8.x-dev, v3.0.0-BETA1, ..., 3.4.x-dev] but these were not loaded, likely because it conflicts with another require.
    - civicrm/cv[v0.3.14, ..., v0.3.48] require symfony/console ^4 -> found symfony/console[v4.0.0-BETA1, ..., 4.4.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires civicrm/cv * -> satisfiable by civicrm/cv[dev-master, dev-colemanw-patch-1, v0.1.0, ..., v0.3.48].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require civicrm/cv:*" to figure out if any version is installable, or "composer require civicrm/cv:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
PHP 8.2.9
Drupal 10.2.0
Amazon Linux 2023
Apache 2.4.5.8
Composer 2.6.6

2 Answers 2

2

UPDATE: Instructions have been fixed, although I still personally think you'll get better results with the phar, and cv is generally something you want to install for all the sites on the server so only needs one copy.


I know the instructions say it but I wouldn't try to install cv this way for drupal 9/10. Use the phar download of cv rather than trying to get it with composer.

2
  • I got some strange error with phar; I'll research later and try composer with cli-tools as well
    – Felix
    Commented Jan 4 at 17:07
  • it worked with cli-tools. Got a few glitches (my password had characters that mysql_connect choked; and cv core:install was running under user id, but drupal created files under apache. But nothing that couldn't be fixed. Thank you
    – Felix
    Commented Jan 5 at 0:37
1

Instead of

composer require civicrm/cv -W

use

composer require civicrm/cli-tools

as in the updated Installation Guide (see post of @Demerit above). Then, you have to add your vendor/bin directory to $PATH. This worked for me recently.

1
  • yes, it work with cli-tools. I didn't need to add vendor/bin to path
    – Felix
    Commented Jan 5 at 0:35

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.