【问题标题】:Drush install giving php errorDrush安装给出php错误
【发布时间】:2017-11-24 16:58:09
【问题描述】:

[bootstrap.inc][1][1]:https://i.stack.imgur.com/cnbLZ.png

不确定这里发生了什么。看起来 AccountInterface 已经包含在 boostrap.inc 中。

我尝试在全球范围内更新 drush 并获得了最新版本。但是在本地文件中,它仍然显示我使用的是 5.10.0 版本。本地文件夹中的 composer.json 说我有 8.1。 提前谢谢!

vagrant@supersport:/var/www/drupalvm$ drush dl basic                                                                                                  

PHP Fatal error:  Class 'Drupal\Core\Session\AccountInterface' not found in 
/var/www/drupalvm/core/includes/bootstrap.inc on line 63                  
Drush command terminated abnormally due to an unrecoverable error.                                                                         
[error]    Error: Class 'Drupal\Core\Session\AccountInterface' not found in 
/var/www/drupalvm/core/includes/bootstrap.inc, line 63                                 

【问题讨论】:

    标签: php drupal vagrant drush


    【解决方案1】:
    1. 我将原始 drush 目录重命名为其他目录(例如: drush5),然后重新安装 drush。

    2. 已删除 drush5 文件夹

    3. 然后我得到一个单独的 php 错误 错误:调用未定义的函数 Drush\UpdateService\simplexml_load_file()
      关注此link 并运行 sudo apt-get install php-xml

    【讨论】:

      猜你喜欢
      • 2014-10-22
      • 2016-03-10
      • 1970-01-01
      • 2018-12-22
      • 2022-11-10
      • 2014-12-01
      • 1970-01-01
      • 2019-02-06
      • 2021-07-26
      相关资源
      最近更新 更多