您在這裡

關於使用drush升級遇到的問題,help!

請教各位前輩關於使用drush升級的問題:

首先說明安裝drush過程

1.將drush-7.x-5.4.zip 下載到/sites/all/modules下 並解壓縮 (我的drupal 是六版的,但沒有六版的drush故抓這個來用)
2.#ln -s /path/to/drush/drush /usr/local/bin/drush

之後執行drush dl 模組名稱,來下載模組ㄧ切正常
但是執行"drush up 模組名稱"來升級模組或"drush dis 模組名稱" 或"drush en 模組名稱"來啟用或停用模組則出現以下錯誤訊息

<啟用或停用模組出現>
Command pm-disable needs a higher bootstrap level to run - you will [error]
need invoke drush from a more functional Drupal environment to runthis command.
The drush command 'dis bakery' could not be executed. [error]
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This error often occurs when Drush is trying to bootstrap a site that has not been installed or does not have a configured database.

Drush was attempting to connect to :
Drupal version : 6.25
Site URI : http://default 不知道為什麼路徑會抓到這個,如何修正?

<升級模組出現>
Command pm-update needs a higher bootstrap level to run - you will [error]
need invoke drush from a more functional Drupal environment to runthis command.
Command pm-update needs the following modules installed/enabled to [error]
run: update.
The drush command 'up' could not be executed. [error]
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This error often occurs when Drush is trying to bootstrap a site that has not been installed or does not have a configured database.

Drush was attempting to connect to :
Drupal version : 6.25
Site URI : http://default 不知道為什麼路徑會抓到這個,如何修正?

不知道問題出在哪裡,請各位前輩指教 >_<'' 謝謝!

謝謝前輩的回答!

小弟試過移除原本放在/sites/all/modules下的drush
並且 重新下載並解壓放到drupal根目錄
並重建符號連結,然後狀況仍然像之前ㄧ樣可以dl 但是en dis up都會出現之前的錯誤訊息!

不知道是否drush的使用需經過安裝而非直接下在並解壓後設定符號連結之故?

如DRUPAL官網說明linux下安裝要執行:
pear channel-discover pear.drush.org
pear install drush/drush

請前輩指點迷津,感激不盡!

我遇到了同样的错误,我的解决方案如下,不知对你是否有帮助:
+ 在使用drush up之前,需要进入你的网站主目录,例如,网站置于/var/www/abc,则先进入abc,然后发布drush up命令

I met the same error as yours, I solved it by:
entering the home directory of your site, e.g. /var/www/abc, and then using drush up
hope this message could help you.