我正在从 GitHub Actions 构建容器。我使用的是 Ubuntu Jammy(最新 LTS,22.04)。几个小时以来,GitHub Actions 运行器无法再访问托管非 AMD64 架构的 Ubuntu 软件包的域ports.ubuntu.com
。
您建议如何解决这个问题?
维护人员注意事项ports.ubuntu.com
:GitHub Actions 运行器的 IP 范围可通过 API 获取。
再生产:
- 创建 GitHub Actions 管道
- 添加构建容器的步骤
- 从基于 Ubuntu Jammy 的镜像构建你的容器
apt-get install
在构建期间执行命令
简短日志:
Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/universe/s/shadow/uidmap_4.8.1-2ubuntu2.1_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/u/unzip/unzip_6.0-26ubuntu3.1_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
...
原始日志:
> [linux/arm64 base 3/5] RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked --mount=target=/var/cache,type=cache,sharing=locked apt-get update -q && apt-get upgrade -y -q && apt-get install -y -q --no-install-recommends build-essential ca-certificates cargo curl dbus-user-session git git-lfs gnupg gzip iptables iputils-ping jq libffi-dev libssl-dev lsb-release make pkg-config python3-dev=3.10.* python3-pip python3=3.10.* software-properties-common sudo tar uidmap unzip wget zip zsh zstd:
#14 575.8 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/universe/s/shadow/uidmap_4.8.1-2ubuntu2.1_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
#14 575.8 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/u/unzip/unzip_6.0-26ubuntu3.1_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
#14 575.8 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/z/zip/zip_3.0-12build2_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
#14 575.8 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/z/zsh/zsh_5.8.1-1_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
#14 575.8 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libz/libzstd/zstd_1.4.8%2bdfsg-3build1_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
#14 575.8 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/r/rustc/libstd-rust-dev_1.65.0%2bdfsg0ubuntu1-0ubuntu0.22.04.1_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
#14 575.8 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/r/rustc/rustc_1.65.0%2bdfsg0ubuntu1-0ubuntu0.22.04.1_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
#14 575.8 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/universe/c/cargo/cargo_0.66.0%2bds0ubuntu0.libgit2-0ubuntu0.22.04_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
#14 575.8 E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libf/libffi/libffi-dev_3.4.2-4_arm64.deb Unable to connect to ports.ubuntu.com:80: [IP: 185.125.190.36 80]
#14 575.8 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?