我正在使用 Ubuntu 18.04.4 LTS 并尝试添加架构 amd64,但之后我无法更新软件包。
以下是一些相关的命令输出:
$ dpkg --print-architecture
arm64
$ dpkg --print-foreign-architectures
amd64
现在当我尝试执行时sudo apt-get update
,出现以下错误
Hit:1 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic InRelease
Get:2 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
Get:3 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports InRelease [74.6 kB]
Hit:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
Ign:5 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/main amd64 Packages
Ign:6 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/restricted amd64 Packages
Ign:7 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/universe amd64 Packages
Ign:8 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/multiverse amd64 Packages
Ign:5 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/main amd64 Packages
Ign:6 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/restricted amd64 Packages
Ign:7 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/universe amd64 Packages
Ign:8 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/multiverse amd64 Packages
Ign:5 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/main amd64 Packages
Ign:6 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/restricted amd64 Packages
Ign:7 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/universe amd64 Packages
Ign:8 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/multiverse amd64 Packages
Err:5 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/main amd64 Packages
404 Not Found [IP: 18.208.205.157 80]
Ign:6 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/restricted amd64 Packages
Ign:7 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/universe amd64 Packages
Ign:8 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic/multiverse amd64 Packages
Ign:9 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/main amd64 Packages
Ign:10 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/restricted amd64 Packages
Ign:11 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/universe amd64 Packages
Ign:12 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse amd64 Packages
Ign:9 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/main amd64 Packages
Ign:10 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/restricted amd64 Packages
Ign:11 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/universe amd64 Packages
Ign:12 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse amd64 Packages
Ign:9 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/main amd64 Packages
Ign:10 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/restricted amd64 Packages
Ign:11 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/universe amd64 Packages
Ign:12 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse amd64 Packages
Err:9 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/main amd64 Packages
404 Not Found [IP: 18.208.205.157 80]
Ign:10 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/restricted amd64 Packages
Ign:11 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/universe amd64 Packages
Ign:12 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates/multiverse amd64 Packages
Ign:13 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports/main amd64 Packages
Ign:14 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports/universe amd64 Packages
Ign:13 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports/main amd64 Packages
Ign:14 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports/universe amd64 Packages
Ign:13 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports/main amd64 Packages
Ign:14 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports/universe amd64 Packages
Err:13 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports/main amd64 Packages
404 Not Found [IP: 18.208.205.157 80]
Ign:14 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports/universe amd64 Packages
Ign:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/main amd64 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted amd64 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe amd64 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse amd64 Packages
Ign:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/main amd64 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted amd64 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe amd64 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse amd64 Packages
Ign:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/main amd64 Packages
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted amd64 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe amd64 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse amd64 Packages
Err:15 http://ports.ubuntu.com/ubuntu-ports bionic-security/main amd64 Packages
404 Not Found [IP: 91.189.88.150 80]
Ign:16 http://ports.ubuntu.com/ubuntu-ports bionic-security/restricted amd64 Packages
Ign:17 http://ports.ubuntu.com/ubuntu-ports bionic-security/universe amd64 Packages
Ign:18 http://ports.ubuntu.com/ubuntu-ports bionic-security/multiverse amd64 Packages
Fetched 163 kB in 1s (141 kB/s)
Reading package lists... Done
E: Failed to fetch http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports/dists/bionic/main/binary-amd64/Packages 404 Not Found [IP: 18.208.205.157 80]
E: Failed to fetch http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/binary-amd64/Packages 404 Not Found [IP: 18.208.205.157 80]
E: Failed to fetch http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/main/binary-amd64/Packages 404 Not Found [IP: 18.208.205.157 80]
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/main/binary-amd64/Packages 404 Not Found [IP: 91.189.88.150 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
任何关于如何修复此问题的帮助都将非常有帮助。谢谢。
答案1
你实际上可以通过在终端上执行此命令来撤消它
sudo dpkg --remove-architecture amd64
这将删除该架构并将其恢复为默认架构
这对我来说很有效。不是要争论,但这可以为你节省一些时间。