Skip to content

Commit 499013d

Browse files
KunalSin9hclaude
andauthored
fix: resolve apt 404 errors in goreleaser CI on ubuntu-latest (24.04) (#706)
ubuntu-latest now uses Ubuntu 24.04 where the Azure APT mirror does not host arm64 packages, causing 404 errors when installing cross-compiler toolchains. Fix by restricting APT sources to amd64 only before updating package indexes, using the deb822 format used by Ubuntu 24.04. Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 34e42fc commit 499013d

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/goreleaser.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,21 @@ jobs:
4646
password: ${{ secrets.GITHUB_TOKEN }}
4747

4848
- name: Install OSX Cross Compiler Build Tools
49-
run: sudo apt-get install -y -qq build-essential clang gcc g++ gcc-mingw-w64 zlib1g-dev libmpc-dev libmpfr-dev libgmp-dev cmake libxml2-dev libssl-dev xz-utils gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
49+
run: |
50+
# ubuntu-latest (24.04) inadvertently enables ARM64 in APT sources, but the
51+
# Azure-hosted mirror doesn't carry those packages, causing 404 errors when
52+
# installing cross-compiler toolchains (e.g. gcc-aarch64-linux-gnu).
53+
# Fix: restrict the APT source to amd64 only before updating indexes.
54+
# Refs:
55+
# https://github.com/actions/runner-images/issues/10901
56+
# https://github.com/actions/runner-images/issues/12878
57+
sudo sed -i 's/^Types: deb$/Types: deb\nArchitectures: amd64/' /etc/apt/sources.list.d/ubuntu.sources
58+
sudo apt-get update -y
59+
sudo apt-get install -y -qq --no-install-recommends \
60+
build-essential clang gcc g++ gcc-mingw-w64 \
61+
zlib1g-dev libmpc-dev libmpfr-dev libgmp-dev \
62+
cmake libxml2-dev libssl-dev xz-utils \
63+
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
5064
5165
- name: Setup OSX Cross Compiler Tool Chain Environment
5266
run: |

0 commit comments

Comments
 (0)