Drush fatal error


#1

I created a server with drupal. I haven’t done anything to it.
I login to the shell, cd to where drupal is installed: /home/master/applications/qyvfzykjuy/public_html

I can run composer require drupal/token and so forth to install drupal modules just fine.
But I need to use drush to update the database (drush updatedb).

When I run drush updatedb or any command, I get the fatal error below. Googling didn’t find a solution, only this related issue: https://github.com/drush-ops/drush/issues/2365

Error message:

PHP Fatal error: phpDocumentor\Reflection\DocBlock\Tags\BaseTag cannot implement phpDocumentor\Reflection\DocBlock\Tag - it is not an interface in /home/179049.cloudwa
ysapps.com/qyvfzykjuy/public_html/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php on line 22
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: phpDocumentor\Reflection\DocBlock\Tags\BaseTag cannot implement phpDocumentor\Reflection\DocBlock\Tag - it is not an interface in
/home/179049.cloudwaysapps.com/qyvfzykjuy/public_html/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php, line 22


#2

As a workaround, I ran composer require drush/drush in the public_html directory and now just run my own local copy of drush in vendor/bin/drush

I can’t replace the global drush with a fixed version since I don’t have sudo access.