gpt4 book ai didi

linux - 无法从Alpine Linux上的边缘存储库安装aws-cli

转载 作者:行者123 更新时间:2023-12-02 19:17:44 26 4
gpt4 key购买 nike

我正在尝试从边缘存储库安装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自己的一组指令来安装它,只需要curlpython即可。

对于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:

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!



资料来源: https://github.com/aws/aws-cli/issues/4971

#3553中进一步:
  • 有aws-cli的官方docker镜像:https://hub.docker.com/r/amazon/aws-cli
  • 有人可以使用它,但是需要大量依赖关系(看起来确实需要一个c编译器):https://github.com/aws/aws-cli/issues/3553#issuecomment-615149941

  • 这也可以解释为什么即使在Alpine 3.12上,实际的软件包也安装了 1.xx版本而不是2.xx版本。

    关于linux - 无法从Alpine Linux上的边缘存储库安装aws-cli,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62221360/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com