Skip to main content
1 of 4

Drush not working after install

I just installed drush using "composer require drush/drush". It ran correctly and when it completes a navigate to vendor/drush/drush/ directory where the drush.php file is located

Then I run the following command: php drush.php status and I get the following error:

PHP Fatal error: Call to undefined method Consolidation\AnnotatedCommand\Hooks\HookManager::getHookOptions() in /home/esokia/work/www/EnviePractice/vendor/drush/drush/includes/annotationcommand_adapter.inc on line 475 PHP Stack trace: PHP 1. {main}() /home/esokia/work/www/EnviePractice/vendor/drush/drush/drush.php:0 PHP 2. drush_main() /home/esokia/work/www/EnviePractice/vendor/drush/drush/drush.php:12 PHP 3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /home/esokia/work/www/EnviePractice/vendor/drush/drush/includes/preflight.inc:66 PHP 4. drush_dispatch() /home/esokia/work/www/EnviePractice/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:67 PHP 5. annotationcommand_adapter_add_hook_options() /home/esokia/work/www/EnviePractice/vendor/drush/drush/includes/command.inc:170 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Call to undefined method Consolidation\AnnotatedCommand\Hooks\HookManager::getHookOptions() in /home/esokia/work/www/EnviePractice/vendor/drush/drush/includes/annotationcommand_adapter.inc, line 475

Can anyone please guide me to what might be causing this?

Additional details:

  1. I am on ubuntu 16.04
  2. Drupal 8 installation
  3. version of drush 8.1