2

I'm trying to install aws-cli from edge repository but I cannot

https://pkgs.alpinelinux.org/package/edge/community/x86_64/aws-cli

Is it an issue with OS version? ( 3.11 / 3.12 )

If so is there a workaround?

root@6f97c6559fe9:/ # echo http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories 
root@6f97c6559fe9:/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
v3.11.6-71-gb45d3b45cc [http://dl-cdn.alpinelinux.org/alpine/v3.11/main]
v3.11.6-68-gf6abc2afac [http://dl-cdn.alpinelinux.org/alpine/v3.11/community]
v3.12.0-442-g76e377ea0b [http://dl-cdn.alpinelinux.org/alpine/edge/main]
OK: 16123 distinct packages available

root@6f97c6559fe9:/ # apk add aws-cli
ERROR: unsatisfiable constraints:
  aws-cli (missing):
    required by: world[aws-cli]
root@6f97c6559fe9:/ # apk add --update aws-cli
ERROR: unsatisfiable constraints:
  aws-cli (missing):
    required by: world[aws-cli]

root@6f97c6559fe9:/ # cat /etc/os-release 
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.11.3
PRETTY_NAME="Alpine Linux v3.11"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
sebastian_t
  • 2,241
  • 6
  • 23
  • 39

1 Answers1

4

So the package page of Alpine seems to confirm that aws-cli is indeed not part of Alpine 3.11 package repository.

This said, you can install it using AWS own set of instructions, you will just need both curl and python in order to do so.

For AWS CLI v1:

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

Source: https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled

For AWS CLI v2, sadly, it seems Alpine is not yet supported:

nateprewitt commented on 24 Feb
Hi @firstval, it looks like you found a response on this behavior in #4685. We're currently tracking Docker support in #3553 which would be a prerequisite for this to work.

That said, we can definitely do better with the exceptions being returned. We're working on getting a warning in our install script to will alert you when the platform isn't supported.

We'll track the remaining piece for alpine support in #3553. Thanks!

Source: https://github.com/aws/aws-cli/issues/4971

Further down in #3553:

This would also explain why, even on Alpine 3.12, the actual package install the version 1.xx and not a 2.xx version.

β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83
  • This method installs aws in version **aws-cli/1.18.74 Python/2.7.18 Linux/4.9.0-9-amd64 botocore/1.16.24** but locally I have version **aws-cli/2.0.5 Python/3.7.3 Linux/4.9.0-9-amd64 botocore/2.0.0dev9** is there a way to install latest version? – sebastian_t Jun 08 '20 at 10:54
  • Yes, there is also in the same AWS help sections, I did copy here the v1 client because on the Alpine package, it also install the version 1.xx. Let me throw a little update to the answer – β.εηοιτ.βε Jun 08 '20 at 11:01
  • 1
    I've allowed myself to edit your post with output of my attempt of installing v2. Unfortunately it didn't work for me. Feel free to remove it. – sebastian_t Jun 08 '20 at 17:47
  • Not an answer to your question: https://github.com/aws/aws-cli/issues/4971 – β.εηοιτ.βε Jun 08 '20 at 18:28