I recently nstalled Drush using composer global require drush/drush:dev-master
and it got installed successfully.
I ran command which drush
and the terminal gave me /home/ravi/.composer/vendor/bin/drush.
I am not able to execute any command from the project root. I get this error.
PHP Fatal error: Cannot redeclare composerRequireDrupal8() (previously declared in /var/lib/composer/vendor/composer/autoload_real.php:63) in /var/www/html/study/drupal/8/vendor/composer/autoload_real.php on line 70
But when I /home/ravi/.composer/vendor/bin/drush status
, then Drush works perfectly well.
Is there any way to use Drush from the project root?
PS: I have tried updating Composer, but it didn't help.