1

When I go to my site on command line and run a drush command I get the following error:

PHP Fatal error:  Cannot redeclare class Drush in /var/www/xmd8/www/vendor/drush/drush/lib/Drush.php on line 36

If I run which drush I get:

/usr/local/bin/drush

I have the Lightning Distribution installed via composer and they are adding Drush.

Any ideas on how to fix this?

1

What version of Drush are you using? Recent versions of Drush will notice that there is a copy of Drush included in your Drupal site, and will redispatch (exec) to use it instead. If you are using an old, unsupported version of Drush (e.g. Drush 6 or earlier), then it will not do this, and the error you see above would be the likely result.

  • Drush Version : 9.0-dev – albertski Jun 14 '16 at 16:13
0

I had Drush version 9.0-dev installed which was causing issues. I downgraded to 8.0.5 and this problem went away. Thanks @greg_1_anderson for giving me the idea.

  • It is probably overly ambitious of Lightning to require Drush 9; this version is still in early development. I'd recommend Drush 8 for most folks' global Drush as well. – greg_1_anderson Jun 14 '16 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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