我正在尝试从边缘存储库安装aws-cli,但是我无法
https://pkgs.alpinelinux.org/package/edge/community/x86_64/aws-cli
操作系统版本有问题吗? (3.11 / 3.12)
如果是这样,是否有解决方法?
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/"
最佳答案
因此,Alpine的package page似乎证实aws-cli
确实不是Alpine 3.11软件包存储库的一部分。
这就是说,您可以使用AWS自己的一组指令来安装它,只需要curl
和python
即可。
对于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
资料来源:https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled
对于AWS CLI v2,可悲的是,似乎尚不支持Alpine:
资料来源:https://github.com/aws/aws-cli/issues/4971
在#3553中进一步:
这也可以解释为什么即使在Alpine 3.12上,实际的软件包也安装了1.xx版本而不是2.xx版本。
关于linux - 无法从Alpine Linux上的边缘存储库安装aws-cli,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/62221360/