1

我按照說明從這裏:安裝AWS EB CLI

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html

這PIP安裝--upgrade --user awsebcli運行得很好,但是當我輸入$ EB

它說找不到命令。

顯然我必須修改路徑變量:

echo $ SHELL。給我:/ bin/bash。

下面是說明:

1) Find your shell's profile script in your user folder. If you are not sure which shell you have, run echo $SHELL. 

$ ls -a ~ 
. .. .bash_logout .bash_profile .bashrc Desktop Documents Downloads 
Bash – .bash_profile, .profile, or .bash_login. 
Zsh – .zshrc 
Tcsh – .tcshrc, .cshrc or .login. 

2) Add an export command to profile script. 

export PATH=~/.local/bin:$PATH 
This command adds a path, `~/.local/bin` in this example, to the current PATH variable. 

3) Load the profile into your current session. 

$ source ~/.bash_profile 

這沒有任何意義,我說:我爲什麼要運行$ ls -a ~?我跑

export PATH=~/.local/bin:$PATH 

它並沒有改變任何東西。相同3.

請告知如何獲得eb工作。謝謝。

UPDATE:回聲$ PATH給我:

/Users/ME/bin/bash:/Users/ME/bin/bash.:/Users/ME/.local/bin:/Library/Frameworks/ Python.framework /版本/ 3.5 /斌:/usr/local/mysql-5.7.11-osx10.9-x86_64/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/庫/框架/ Python的.framework /版本/ 3.5 /斌:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/ME/.local/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/ USR /本地/的mysql-5.7.11-osx10.9-x86_64的/ bin中:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/庫/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet

+0

'echo $ PATH'輸出是什麼? – helloV

+0

請看更新的回答 –

+1

'〜/ .local/bin'就是一個例子。對於OSX,它是不同的。再次檢查說明。我建議你只需要執行'$ brew install awsebcli'來處理所有事情。 – helloV

回答