Debian apt-get 更新 404 未找到错误

mte*_*m88 10 linux debian raspberry-pi apt

我的 Raspberry Pi 3 有问题。当我尝试运行时apt-get update,出现 404 未找到错误。我对 Linux 很陌生,不知道出了什么问题。

这是错误代码:

pi@raspberrypi:~ $ sudo apt-get update
Ign http://mirrordirector.raspbian.org jessie InRelease
Ign http://archive.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease                            
Ign http://archive.raspbian.org jessie Release.gpg                             
--*cut*--

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/rpi/binary-armhf/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
pi@raspberrypi:~ $ 
Run Code Online (Sandbox Code Playgroud)

我的/etc/apt/sources.list文件如下所示:

pi@raspberrypi:~ $ sudo apt-get update
Ign http://mirrordirector.raspbian.org jessie InRelease
Ign http://archive.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie InRelease                            
Ign http://archive.raspbian.org jessie Release.gpg                             
--*cut*--

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/rpi/binary-armhf/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
pi@raspberrypi:~ $ 
Run Code Online (Sandbox Code Playgroud)

我的/etc/apt/sources.list.d/raspi.list文件如下所示:

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
Run Code Online (Sandbox Code Playgroud)

请帮忙。如果需要的话我可以提供更多信息。

注意:Chromium、ping(来自 bash shell)正在运行。

注意:无法从另一台使用相同 WiFi 的计算机(也无法在 Raspberry Pi 3 上)访问无法获取的网站,例如http://mirrordirector.raspbian.org/raspbian/dists/jessie/non-free /binary-armhf/Packages给出 404 Not Found 错误。

https://superuser.com/a/1133746/1498871有一些关于 EOL Debian 版本的信息。这是我的问题吗?

我已经尝试了一些关于此主题的超级用户帖子,但我尝试过的解决方案都不起作用。

Raspbian GNU/Linux 8.0 (jessie) 是来自lsb_release -a.

小智 16

我遇到了同样的问题,但不想完成升级版本的工作,所以只需更新我的sources.listfrommirrordirector.raspbian.org到中的镜像链接legacy.raspbian.org

来源.list

deb http://legacy.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free
Run Code Online (Sandbox Code Playgroud)

这篇文章中的方法,有人使用 Wheezy(一个甚至更旧的Raspbian 版本)遇到了同样的问题。

  • 我想这是合理的——但在某种程度上,保留旧版本会适得其反。也就是说,我对帮助维护以 8.04 为基础的设备有一点偏见...... (2认同)
  • 似乎有效...但这不是最好的解决方案...将来您可能会遇到软件兼容性问题。谢谢您的回答! (2认同)

Jou*_*eek 7

您的 Debian 版本已于 2017 年左右过时。Raspberry Pi 基金会不再支持它。

最简单的方法是从最新的 Raspberry Pi 操作系统开始,重新应用您所做的任何更改(我在 serverfault 上有一组相当简单的说明,说明我将如何做到这一点)并从那里开始工作。

或者,您可以尝试升级发行版,但在单板计算机上,偶尔会出现 x86es 上找不到的奇怪情况,这取决于存储库仍然可用。

如果SD 卡/安装上有任何重要内容,对其进行备份。

然后事情就变得有趣了。Raspbian 的“先前”版本是“Stretch”。当前的一部是《Buster》,下一部《Bullseye》即将上映——你有杰西。

理论上,如果存储库仍在运行,您可以修改您的/etc/apt/sources.list*.list文件并/etc/apt/sources.list.d替换jessiestretch,然后执行apt update一个apt full-upgrade,然后再次执行,替换stretchbuster(并且很快在另一步骤中替换buster为) - 在一个版本中提到了bullseye这样做文档,但跳跃多个版本不是我见过的人所做的事情 - 分步骤进行。好的一面是,如果出现问题,您有备份并可以从那里开始工作。