Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
i installed composer globally using:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
trying to install (and use) drupal composer throws the following error
nodejs4@host100:~/.drush$ drush dl composer
There are no stable releases for project composer. [warning]
Choose one of the available releases for composer:
[0] : Cancel
[1] : 7.x-1.x-dev - 2013-Sep-30 - Development
1
Project composer (7.x-1.x-dev) downloaded to /home/nodejs4.drupal7.com/.drush/composer. [success]
PHP Fatal error: Cannot redeclare Composer\Autoload\includeFile() (previously declared in /usr/share/drush7/vendor/composer/ClassLoader.php:410) in /usr/share/drush/commands/composer/vendor/composer/ClassLoader.php on line 413
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Cannot redeclare Composer\Autoload\includeFile() (previously declared in /usr/share/drush7/vendor/composer/ClassLoader.php:410) in
/usr/share/drush/commands/composer/vendor/composer/ClassLoader.php, line 413
nodejs4@host100:~/.drush$
Comments
Comment #2
Syntapse CreditAttribution: Syntapse as a volunteer commentedtrying to use it throws following error:
Comment #3
Syntapse CreditAttribution: Syntapse as a volunteer commentedis this running a local composer or the global one i installed from getcomposer?
Comment #4
Syntapse CreditAttribution: Syntapse as a volunteer commentedI have reduced the errors as follows:
Comment #5
RobLoachDownload the latest version should fix it. Re-open if you still have issues.
rm -rf ~/.drush/composer
drush dl --default-major=8 composer