|
|
|
|
@ -5,18 +5,13 @@ export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
|
|
dpkg --add-architecture arm64
|
|
|
|
|
|
|
|
|
|
# focal 上使用传统 sources.list 写法,兼容性更好。
|
|
|
|
|
rm -rf /etc/apt/sources.list.d/*
|
|
|
|
|
cat > /etc/apt/sources.list <<'EOF'
|
|
|
|
|
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
|
|
|
|
|
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
|
|
|
|
|
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
|
|
|
|
|
deb [arch=amd64] http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
|
|
|
|
|
|
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse
|
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse
|
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted universe multiverse
|
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
|
|
|
|
|
# 保留基础镜像默认 amd64 源,只补充 arm64 ports 源,避免覆盖后出现源配置兼容问题。
|
|
|
|
|
rm -f /etc/apt/sources.list.d/arm64-ports.list
|
|
|
|
|
cat > /etc/apt/sources.list.d/arm64-ports.list <<'EOF'
|
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse
|
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse
|
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
|
|
|
|
|
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-security main restricted universe multiverse
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
apt-get update
|
|
|
|
|
|