【问题标题】:I'm tried installing aws command line tool我尝试安装 aws 命令行工具
【发布时间】:2015-10-22 18:07:42
【问题描述】:

我尝试安装 aws 命令行工具来运行命令

aws

在 Linux 上

我尝试使用 pip 安装它,但出现错误 http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os

/bin/aws: Permission denied

每当我运行命令时

aws help 

我该怎么办?

【问题讨论】:

  • 不起作用。我也已经以 root 身份运行它
  • ls -l /bin/aws 的输出是什么?
  • -rw-r--r--。 1 根 814 Oct 22 18:09 /bin/aws
  • 运行chmod 755 /bin/aws后重试
  • @Dez 我通常不会添加如此简单的单行答案,假设它不会帮助其他任何人。但是因为你也能找到这个问题,所以我添加了更多解释。

标签: aws-cli


【解决方案1】:

ls -l /bin/aws 的输出显示:

-rw-r--r--. 1 root root 814 Oct 22 18:09 /bin/aws

这意味着您有读/写权限,但没有执行权限。要解决这个问题,您必须像这样运行chmod

chmod 755 /bin/aws

在此之后ls -l /bin/aws 的输出应该显示:

-rwxr-xr-x. 1 root root 814 Oct 22 18:09 /bin/aws

x 表示您现在也拥有执行权限。其他用户也将具有执行权限。如果没有其他限制,其他用户也可以执行。

【讨论】:

  • 感谢@Wimmel 的回答。对于 this install page 上的所有非 Windows 选项,我必须在文件上运行 chmod 755 以使其可执行。
  • 我有同样的问题,除了我的aws 目录有777 权限。将这些更改为 755 解决了这个问题。
【解决方案2】:

我遇到了同样的问题,但无法正常工作。 我用directions on the aws site卸载了它

然后我在 linux 上使用 homebrew 安装它,它工作正常:

# as of writing installs aws-cli v2.X
brew install awscli

【讨论】:

    猜你喜欢
    • 2019-03-02
    • 1970-01-01
    • 2014-01-16
    • 2013-10-15
    • 2012-03-08
    • 2017-04-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多