我按照这里的说明操作:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html
这个 pip install --upgrade --user awsebcli 运行正常,但是当我输入 $ eb 时
它说找不到命令。
显然我必须修改路径变量:
回显 $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 工作。谢谢。
更新:echo $PATH 给我:
/Users/ME/bin/bash:/Users/ME/bin/bash.:/Users/ME/.local/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/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:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/ME/.local/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/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:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet
最佳答案
关于bash - 在 Mac 操作系统上安装 aws eb cli,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40688500/