我安装了drush,当我执行"drush状态“时,它说我的drush版本是6.6.0。
我希望使用drush7,所以我从github下载了它,并执行了以下命令:
chmod +x drush.phar
数独mv drush.phar /usr/本地/bin/drush
钻孔井
我得到以下错误:无法找到drush命令init。
当我做钻孔状态,它仍然说我有drush6版本.我该怎么办?
发布于 2018-03-06 11:31:20
可以随时手动安装
# get drush latest 8 version from
# https://github.com/drush-ops/drush/releases
# or any version that you want
wget https://github.com/drush-ops/drush/releases/download/8.1.16/drush.phar
# make it executable
chmod +x drush.phar
# move it to home directory or any other directory
mv drush.phar ~/drush
# go to that directory
cd ~
# find out the path to the directory
pwd
# the output would look similar to this
# /home/your_user
# edit the following file
nano .bash_profile
# or in some systems
# nano .bashrc
# add this the end of the file
alias drush='/home/your_user/drush'
# use the alias you just setup
source ~/.bash_profile注意:上面的示例在ubuntu中工作,但在其他发行版上应该类似。
根据文档 drush 8与D8、D7和D6一起工作,所以没有理由安装drush 7。
如果您想用drush8调用它,请在.bash_profile文件中使用以下alias drush8='/home/your_user/drush'
https://drupal.stackexchange.com/questions/257109
复制相似问题