【发布时间】:2016-05-01 23:56:42
【问题描述】:
我已经在我的 Mac(El Capitan) 上的 apache 中设置了虚拟主机。我所有的项目都位于我的用户/我的名字/站点中,并且我安装了 Drush。我可以使用 drush 下载 stuf,例如:drush dl drupal。但是当我尝试使用 drush 启用模块时,我得到以下信息:
Command pm-enable needs a higher bootstrap level to run - you will [error]
need to invoke drush from a more functional Drupal environment to run
this command.
The drush command 'en admin_toolbar' could not be executed. [error]
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This may occur when Drush is trying to:
* bootstrap a site that has not been installed or does not have a
configured database. In this case you can select another site with a
working database setup by specifying the URI to use with the --uri
parameter on the command line. See `drush topic docs-aliases` for
details.
* connect the database through a socket. The socket file may be
wrong or the php-cli may have no access to it in a jailed shell. See
http://drupal.org/node/1428638 for details.
Drush was attempting to connect to:
Drupal version : 7.41
Site URI : http://default
Database driver : mysql
Database hostname : localhost
Database port :
Database username : root
Database name : MyDatabase
PHP executable : /usr/bin/php
PHP configuration :
PHP OS : Darwin
Drush script : /Users/kim/.composer/vendor/drush/drush/drush.php
Drush version : 8.1-dev
Drush temp directory : /tmp
Drush configuration :
Drush alias files :
Drupal root : /Users/MyName/Sites/MyProject
Site path : sites/default
我的猜测是我的 drush 没有正确配置到我的数据库设置,但我不知道如何解决这个问题,或者这是否是真正的问题。如果有人可以帮助我,那就太好了!
【问题讨论】:
-
Drush 设置有问题。试试这个:drupal.stackexchange.com/questions/98802/…
标签: apache drupal osx-elcapitan drush