所有问题解决方案
我们都已亲身测试

Linux基于alpine构建镜像时错误:temporary error (try again later),ERROR: unsatisfiable constraints 解决方案

首先检查DNS及与请求源地址的网络连接是否正常:

curl -v -s http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz > /dev/null

如果返回正常且构建时仍然报如下错误:


fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz: temporary error (try again later)
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz: temporary error (try again later)
ERROR: unsatisfiable constraints:
.........

请尝试将防火墙后端服务改为iptables并重启防火墙:

vi /etc/firewalld/firewalld.conf

编辑文档
找到:FirewallBackend=nftables
改为:FirewallBackend=iptables

然后重启防火墙:

sudo systemctl restart firewalld.service
赞(0)
未经允许不得转载:无忧解决网 » Linux基于alpine构建镜像时错误:temporary error (try again later),ERROR: unsatisfiable constraints 解决方案
分享到: 更多 (0)

评论 1

评论前必须登录!