(resolved, see my last comment on this post) Problem in installing AWS CLI (using the AWS documentation)

0

I am following the AWS documentation to install AWS CLI in local, this one: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html#install-tshoot but at the last command I encountered a problem with the installation of AWS CLI ( the last command "sudo ./aws/install": did not succeed and here (attached) is the problem in a screenshot. What do I do in this case? should I remove the folder /usr/local/aws-cli/v2/2.11.21 ? and thanks Enter image description here

已提问 1 年前1989 查看次数
1 回答
0
已接受的回答

Try adding --update to the install command.

If that fails, delete the /usr/local/aws-cli directory. Then rerun sudo aws/install.

profile pictureAWS
专家
kentrad
已回答 1 年前
  • still the same problem sudo aws/install --update result: Found same AWS CLI version: /usr/local/aws-cli/v2/2.11.21. Skipping install.

  • thanks for your response, here the steps I did: In fact, what made me think that the installation didn't work was that when I did the command "$ aws --version", it did not work. So I redid "sudo ./aws/install" (and got the result that I sent you in my scrrenshot) ==> But I understood that the installation was OK (since I have usr/local/aws-cli/v2/2.11.21, what I did was focus on resolving the problem of "aws --version." Below, the steps: $ aws --version

    Result: Command 'aws' not found, but can be installed with sudo apt install awscli

    $sudo apt install awscli

    Result: Reading package lists... Done Building dependency tree
    Reading state information... Done Package awscli is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'awscli' has no installation candidate

    Solution (I did a search on the net, and according to this link : https://unix.stackexchange.com/questions/561236/how-to-install-awscli-on-ubuntu-18-04) $sudo apt-get update $sudo apt-get install awscli It took me a lot of time (particularly for the second command), but it is Ok now when I do: $ aws --version

    Result: aws-cli/1.22.34 Python/3.10.6 Linux/4.4.0-19041-Microsoft botocore/1.23.34

  • OK. Just know that you have V1 of the CLI instead of V2. Both are being maintained, but you will want to make sure if you consult the reference manual, you look at V1.

  • OK, thanks for the information.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容