我一直在寻找解决方案,但我只是没有找到它。我正在尝试在我的 MAMP 平台上使用 drush(我有 Leopard)。安装似乎很顺利,但是当我尝试使用它时出现错误。
我的默认外壳是 tcsh。我创建了一个文件 .bash_profile 并在其中添加了“export PATH="/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php5.3/bin:$PATH" 行。然后我更改为 bash shell并发送命令:drush en views_ui.(我从 tcsh shell 得到同样的错误)
我在网站的根。
对不起,如果这是一个重复的问题。请帮忙...
bash-3.2$ drush en views_ui
Command pm-enable needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to [error]
run this command.
The drush command 'en views_ui' 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.0
Site URI : http://default
Database driver : mysql
Database hostname : localhost
Database username : root
Database name : d7dev
Default theme : garland
Administration theme: garland
PHP configuration : /private/etc/php.ini
Drush version : 5.8
Drush configuration:
Drupal root : /Applications/mamp/htdocs/d7dev
Site path : sites/default
Modules path : sites/all/modules
Themes path : sites/all/themes
File directory path: sites/default/files
%paths : Array