问题描述
在安装完drupal 8 后远程登录上去测试drush命令报以上错误。
问题产生的原因是因为drush版本的问题,drush 6及以下版本与最新的drupal 8 可能不兼容,需要通过composer这一php包管理器安装。
安装流程
. First install Composer globally
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
2 . Now add Composer's directory to your path by editing your .bash_profile or .zshrc.
$ export PATH="$HOME/.composer/vendor/bin:$PATH"
3 . Reload your terminal or just re-source the configuration you just added.
$ source $HOME/.bashrc
4 . Now that you have Composer working, you can install Drush from the latest HEAD.
$ composer global require drush/drush:dev-master