I already wrote a blog post on How to install AWS CLI on RockyLinux, where I shared how to leverage the RPM package from EPEL repository. So what do I need to create a post here?
Well, when I tried to use the same method to install the AWS CLI on an AlmaLinux 9.2, there was an issue with dependency. Here is what happened:
[kenno@wedev1 ~]$ sudo dnf install awscli
[sudo] password for kenno:
Last metadata expiration check: 0:05:08 ago on Sun 20 Aug 2023 18:35:23.
Error:
Problem: conflicting requests
- nothing provides python3.9dist(docutils) >= 0.10 needed by awscli-1.23.10-3.el9.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Good thing is, there are a few ways to install AWS CLI on Linux. I’ll be using the method described at official AWS document to install the CLI.
$ sudo dnf install unzip
$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
$ unzip awscliv2.zip
$ sudo ./aws/install
Finally, the CLI can be verified by running:
[kenno@wedev1 ~]$ aws --version
aws-cli/2.13.11 Python/3.11.4 Linux/5.14.0-284.25.1.el9_2.x86_64 exe/x86_64.almalinux.9 prompt/off
So which method is best or which one do I prefer? Personally, I prefer to install software that is available on the repository due to the fact that I also like to manage the installation using Ansible.
Reference: