Skip to content

Commit 2e2047b

Browse files
committed
fix: restrict main Ubuntu repos to amd64 for ARM64 cross-compilation
- Add [arch=amd64] restriction to main sources.list when building for ARM64 - Prevents 404 errors when apt tries to fetch arm64 packages from x86-only repos - ARM64 packages correctly fetched only from ports.ubuntu.com - x86_64 builds remain unaffected
1 parent 84a93ae commit 2e2047b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/build-linux.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
# Add ARM64 architecture
4444
sudo dpkg --add-architecture arm64
4545
46+
# Restrict main sources to amd64 only to prevent 404 errors
47+
sudo sed -i 's/^deb /deb [arch=amd64] /g' /etc/apt/sources.list
48+
4649
# Add ARM64 repositories
4750
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports $(lsb_release -cs) main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/arm64.list
4851
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports $(lsb_release -cs)-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/arm64.list

0 commit comments

Comments
 (0)