我正在运行 Ubuntu 18.04.1 LTS,并尝试更新系统上的内容。我尝试运行:
sudo apt-get update
这会产生一些 404 错误:
sudo apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:3 https://packages.microsoft.com/repos/vscode stable InRelease
Hit:8 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
Hit:9 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu bionic InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:10 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Get:11 http://us.archive.ubuntu.com/ubuntu bionic/main i386 Packages [1,007 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:21 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [295 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages [212 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Ign:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Ign:47 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 Packages
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Ign:49 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages [975 kB]
Ign:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:78 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:79 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:80 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Ign:81 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:47 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 Packages
Ign:82 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
Ign:83 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:49 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:84 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages
Ign:85 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages
Ign:78 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:79 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
Ign:80 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:81 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:47 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 Packages
Ign:82 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
Ign:83 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:49 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:84 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages
Ign:85 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages
Ign:78 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
Ign:79 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Err:22 http://security.ubuntu.com/ubuntu bionic-security/main arm64 Packages
404 Not Found [IP: 91.189.88.149 80]
Ign:80 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:81 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Ign:47 http://security.ubuntu.com/ubuntu bionic-security/restricted arm64 Packages
Ign:82 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
Ign:49 http://security.ubuntu.com/ubuntu bionic-security/universe arm64 Packages
Ign:83 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:84 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages
Ign:78 http://security.ubuntu.com/ubuntu bionic-security/multiverse arm64 Packages
Ign:85 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages
Err:12 http://us.archive.ubuntu.com/ubuntu bionic/main arm64 Packages
404 Not Found [IP: 91.189.91.23 80]
Ign:79 http://us.archive.ubuntu.com/ubuntu bionic/restricted arm64 Packages
Ign:80 http://us.archive.ubuntu.com/ubuntu bionic/universe arm64 Packages
Ign:81 http://us.archive.ubuntu.com/ubuntu bionic/multiverse arm64 Packages
Err:82 http://us.archive.ubuntu.com/ubuntu bionic-updates/main arm64 Packages
404 Not Found [IP: 91.189.91.23 80]
Ign:83 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted arm64 Packages
Ign:84 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe arm64 Packages
Ign:85 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse arm64 Packages
Fetched 419 kB in 4s (104 kB/s)
Reading package lists... Done
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.23 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages 404 Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.23 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
然后 sudo apt-get upgrade 似乎认为什么都不存在:
tombot@Magma-Core-Kernel:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
此外 --fix-missing 也无济于事。我尝试使用以下方法升级发行版:
sudo apt-get dist-upgrade
但这与“sudo apt-get upgrade”的结果相同
我可以顺利 ping 91.189.91.26:
ping 91.189.91.26
PING 91.189.91.26 (91.189.91.26) 56(84) bytes of data.
64 bytes from 91.189.91.26: icmp_seq=1 ttl=47 time=79.6 ms
我尝试下载一个新的 sources.list 文件,但仍然得到:
Reading package lists... Done
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.23 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.26 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages 404 Not Found [IP: 91.189.91.26 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
另外,这是我的第一篇 StackExchange 帖子,所以我希望我的帖子一切都正确。
谢谢!
答案1
您面临的问题基本上是无法访问 IP 91.189.91.26,请尝试重新启动您的 Internet 连接,并检查是否可以使用此命令 ping 该 IP 地址:
ping 91.189.91.26
就我而言,它可以正常工作。
如果没有任何效果,请尝试更改您正在使用的镜像以获取更新:
使用您最喜欢的文本编辑器(在我的情况下是 nano)打开您的 sources.list 文件。
sudo nano /etc/apt/sources.list
找到文本
并将其替换为
然后运行:
sudo apt update && sudo apt upgrade
如果仍然不起作用,您可以尝试分发更新:
sudo apt-get dist-upgrade
如果仍然不起作用,这是我发现的这里
运行以下命令,将 archive.ubuntu.com 和 security.ubuntu.com 软件包存储库 URL 更新为 old-releases.ubuntu.com。由于常规 Ubuntu 版本链接到 archive.XXX 和 security.XX URL,因此在其生命周期 9 个月后将取消支持,并将相应的存储库移至 old-releases。….
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
祝你好运。
答案2
解决方案略有不同;如果在使用 Ubuntu 构建 docker Dockerfile 时发生这种情况,则使用类似于的命令,docker build -t "localhost:5000/blahblah" .
这是由于sources.list
被缓存并且已过时。要解决此问题,请使用开关no-cache
,如下所示docker build --no-cache -t "localhost:5000/blahblah" .
。
答案3
部分答案...
来自评论...
用户在更新软件存储库时遇到了问题。
/etc/apt/sources.list
和/etc/apt/sources.list.d/*.list
文件已被修改。它们引用了不存在的 arm64 repo。
/etc/apt/sources.list
已替换为标准 18.04 版本。错误有所减少。
我们正在/etc/apt/sources.list.d/*.list
文件中搜索“binary-arm64”错误。
更新#1:
新/etc/apt/sources.list
产品有一些错误。请按以下步骤修复它...
sudo chown root:root /etc/apt/sources.list
sudo chmod 644 /etc/apt/sources.list
然后让我们对 arm64 进行粗略搜索......
sudo grep -r arm64 /etc/apt
更新 #2:
Ubuntu 已重新安装,并且一切都恢复正常运行,包括 Virtualbox。
答案4
我没有安装梯子,所以我也遇到了 404。在我取消选中“软件和更新”>“其他软件”中“http://us...”之前的复选框后,单击“关闭”按钮,然后单击“重新加载”,我可以使用,
sudo apt-get update
没有任何错误