首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不能安装drush8,有drush6

不能安装drush8,有drush6
EN

Drupal用户
提问于 2018-03-06 09:47:05
回答 1查看 81关注 0票数 0

我安装了drush,当我执行"drush状态“时,它说我的drush版本是6.6.0。

我希望使用drush7,所以我从github下载了它,并执行了以下命令:

chmod +x drush.phar

数独mv drush.phar /usr/本地/bin/drush

钻孔井

我得到以下错误:无法找到drush命令init。

当我做钻孔状态,它仍然说我有drush6版本.我该怎么办?

EN

回答 1

Drupal用户

发布于 2018-03-06 11:31:20

可以随时手动安装

代码语言:javascript
复制
# 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'

票数 0
EN
页面原文内容由Drupal提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://drupal.stackexchange.com/questions/257109

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档