bash - 在 Mac 操作系统上安装 aws eb cli

标签 bash macos amazon-web-services aws-cli amazon-elastic-beanstalk

我按照这里的说明操作:

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

最佳答案

使用:

$ brew install awsebcli

描述于:Install the EB CLI on OS X

Homebrew 专为 OSX 设计,可以很好地处理依赖关系。

关于bash - 在 Mac 操作系统上安装 aws eb cli,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40688500/

相关文章:

bash - 如何在 sed 脚本中使用 sed 删除括号内的字符串?

bash - 如何打印包含两个匹配两种不同模式的文件的目录?

linux - 通过 lame 增加几个 mp3 文件的音量

macos - Mac OS X 终端 [使用选项作为元键] 覆盖西类牙语键盘中的反斜杠

amazon-web-services - 如何使用 terraform 在 AWS API 网关中添加 URL 查询字符串参数?

amazon-web-services - 如何自动启动、执行和停止EC2?

regex - 在 bash 中批量文件重命名,删除带空格的名称,留下尾随数字

macos - 将界面生成器连接到 Xcode 4 中的代码

macos - 基于 MAC 10.7.4 构建的 Qt 应用程序无法在 10.6 上运行

amazon-web-services - 在维护时段任务中配置 SNS 主题通知 IAM 角色