AWS CLI $ PATH设置 [英] AWS CLI $PATH Settings

查看:94
本文介绍了AWS CLI $ PATH设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在遵循 AWS CLI设置指南.我已成功在Mac OS X终端上成功安装了该工具,并显示以下输出:

I am following the AWS CLI Setup guide. I have managed to successfully install the tool on my Mac OS X terminal with the following output:

Running cmd: /usr/bin/python virtualenv.py --python /usr/bin/python /Users/fr/.local/lib/aws
Running cmd: /Users/fr/.local/lib/aws/bin/pip install --no-index --find-links file:///Users/fr/Downloads/awscli-bundle/packages awscli-1.5.3.tar.gz
You can now run: /Users/fr/.local/lib/aws/bin/aws --version

我的问题是我必须输入完整路径/Users/fr/.local/lib/aws/bin/aws 才能执行任何 aws 命令.按照指南的最后一步,我应该能够直接执行aws命令,而无需键入要执行的绝对路径.

My issue is that I have to type the full path /Users/fr/.local/lib/aws/bin/aws to execute any aws command. As per the guide's final step, I should be able to execute aws command directly without typing the absolute path for it to execute.

当我尝试仅使用 aws 时,会得到以下输出:

When I try using just aws, I get the following output:

aws --version                                                                                         ⏎
command not found: aws

我按照说明进行操作,以确保〜/bin 在我的 PATH 环境中,并且可以看到没有输出,因此我执行了导出 PATH =〜/bin:$ PATH 命令将〜/bin添加到$ PATH .但是,这没有什么区别. aws 命令不能直接运行.

I followed the instructions to make sure that ~/bin is in my PATH environment and I could see there was no output, hence, I executed the export PATH=~/bin:$PATH command to add ~/bin to $PATH. But this has made no difference. The aws command does not work directly.

请问有人可能出了什么问题吗?

Could someone please advise what could be going wrong?

推荐答案

以下是在Mac OSX(curl或wget)上安装AWS cli的三个步骤.第三步将正确设置路径

Here are the three steps to install AWS cli on mac OSX (curl or wget) The third step will set you path correctly

$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

另一种最简单的方法是使用自制软件

The other easiest way is to do using homebrew

brew install awscli

如果您想要开发版本,就可以

If you want the development version you can do

brew install awscli --HEAD

这篇关于AWS CLI $ PATH设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆