简体   繁体   English

MacOS High Sierra Drush仅提供2个选项

[英]MacOS High Sierra Drush only gives 2 options

So today I was installing Drush via Composer. 所以今天我要通过Composer安装Drush。 it was completely installed according to terminal but in /usr/local/bin there is no Drush folder. 它已根据终端完全安装,但在/ usr / local / bin中没有Drush文件夹。

I tried before and then I tried with Composer as well, but since that failed I tried via Homebrew but since I work with MAMP, it only gave 2 options (cancel and drush) and yea then I uninstalled that and tried again with composer even did a fresh install. 我之前尝试过,然后也尝试了Composer,但是由于失败了,我通过Homebrew尝试了,但是由于我使用MAMP,它只提供了2个选项(取消和刷新),是的,然后我卸载了它,然后再次尝试了composer,甚至做了全新安装。

I did the "composer global show -P" command and It's in /users/mymacname/.composer then it outputs a giant list like: composer-plugin-api 1.1.0 The Composer Plugin API 我执行了“ composer global show -P”命令,它位于/users/mymacname/.composer中,然后输出一个庞大的列表,例如:composer-plugin-api 1.1.0 Composer Plugin API

so when I go to that location, there is a .composer folder, when I go in that folder - vendor - bin - there are: 因此,当我转到该位置时,会有一个.composer文件夹,当我进入该文件夹时-vendor-bin-有:

  • drush
  • drush.complete.sh drush.complete.sh
  • drush.launcher drush.launcher
  • drush.php drush.php
  • php-parse PHP解析
  • psysh psysh

thats all there is and when I type drush, or drush status it gives "-bash: drush: command not found 多数民众赞成在那里,当我键入drush或drush状态时,它会给出“ -bash:drush:命令未找到

How can I solve this? 我该如何解决?

Greetings Ditger 问候Ditger

I think you missed the step where you have to add the export to your .bash_profile 我认为您错过了必须将导出添加到.bash_profile的步骤

export PATH=$PATH:/Users/[username]/drush

this is of course specific to my install, you will have to find where your drush is installed and appropriately add the export path 这当然是我的安装所特有的,您将必须找到Drush的安装位置并适当添加导出路径

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM