![更新 Debian 8 软件包](https://linux22.com/image/763048/%E6%9B%B4%E6%96%B0%20Debian%208%20%E8%BD%AF%E4%BB%B6%E5%8C%85.png)
我看过很多帖子,每个帖子的答案都略有不同。我试过所有我能试的方法,但我认为它们现在都过时了。
因此,我们运行的是 Debian 8(无法升级,因为它不是我们的服务器),结果cat /etc/os-release
是
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
输出cat /etc/debian_version
为:
8.3
是/etc/apt/sources.list
deb http://archive.debian.org/debian/ jessie main non-free contrib
deb-src http://archive.debian.org/debian/ jessie main non-free contrib
deb http://archive.debian.org/debian-security/ jessie/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ jessie/updates main non-free contrib
里面/etc/apt/sources.list.d
有...
-rw-r--r-- 1 root root 244 Feb 17 2016 backports.list
-rw-r--r-- 1 root root 82 Feb 4 09:04 google-cloud-monitoring.list
-rw-r--r-- 1 root root 82 Feb 4 09:08 jessie-backports.list
-rw-r--r-- 1 root root 79 Feb 4 09:08 jessie.list
-rw-r--r-- 1 root root 183 Jul 18 2016 mod-pagespeed.list
这里面有.....(合并列表)
deb http://httpredir.debian.org/debian/ jessie-backports main
deb-src http://httpredir.debian.org/debian/ jessie-backports main
deb http://http.debian.net/debian jessie-backports main
deb-src http://http.debian.net/debian jessie-backports main
deb https://packages.cloud.google.com/apt google-cloud-monitoring-jessie-all main
deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main
deb [check-valid-until=no] http://cdn-fastly.deb.debian.org/debian jessie main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb http://dl.google.com/linux/mod-pagespeed/deb/ stable main
然而,我们收到以下错误,这说明可能需要将源再次更改为有效的源?
W: GPG error: http://archive.debian.org jessie Release: The following signatures were invalid: KEYEXPIRED 1587841717
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-backports/main/source/Sources 404 Not Found
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://http.debian.net/debian/dists/jessie-backports/main/source/Sources 404 Not Found
W: Failed to fetch http://http.debian.net/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/main/source/Sources 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/non-free/source/Sources 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/contrib/source/Sources 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/main/binary-amd64/Packages 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/non-free/binary-amd64/Packages 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/contrib/binary-amd64/Packages 404 Not Found [IP: 130.89.148.13 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
完整堆栈是..
root@generational-vm:/var/lib/apt# apt-get update
Ign http://dl.google.com stable InRelease
Hit http://dl.google.com stable Release.gpg
Ign http://cdn-fastly.deb.debian.org jessie InRelease
Hit http://dl.google.com stable Release
Ign http://httpredir.debian.org jessie-backports InRelease
Ign http://http.debian.net jessie-backports InRelease
Hit http://cdn-fastly.deb.debian.org jessie Release.gpg
Hit http://cdn-fastly.deb.debian.org jessie Release
Get:1 http://dl.google.com stable/main amd64 Packages [2,043 B]
Ign http://httpredir.debian.org jessie-backports Release.gpg
Ign http://httpredir.debian.org jessie-backports Release
Ign http://archive.debian.org jessie InRelease
Get:2 http://cdn-fastly.deb.debian.org jessie/main amd64 Packages [6,818 kB]
Hit https://packages.cloud.google.com google-cloud-monitoring-jessie-all InRelease
Ign http://archive.debian.org jessie/updates InRelease
Get:3 http://cdn-fastly.deb.debian.org jessie/main Translation-en [4,581 kB]
Hit http://archive.debian.org jessie-backports InRelease
Ign http://http.debian.net jessie-backports Release.gpg
Ign http://dl.google.com stable/main Translation-en_US
Ign http://http.debian.net jessie-backports Release
Ign http://dl.google.com stable/main Translation-en
Get:4 http://archive.debian.org jessie Release.gpg [2,420 B]
Get:5 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main amd64 Packages [582 B]
Get:6 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en_US [1,449 B]
Get:7 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en [1,449 B]
Get:8 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en_US [1,449 B]
Get:9 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en [1,449 B]
Get:10 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en_US [1,449 B]
Get:11 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en [1,449 B]
Get:12 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en_US [1,449 B]
Get:13 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en [1,449 B]
Get:14 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en_US [1,449 B]
Ign https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en_US
Ign http://archive.debian.org jessie/updates Release.gpg
Get:15 https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en [1,449 B]
Ign https://packages.cloud.google.com google-cloud-monitoring-jessie-all/main Translation-en
Err http://http.debian.net jessie-backports/main Sources
Ign http://archive.debian.org jessie-backports/main amd64 Packages/DiffIndex
Ign http://archive.debian.org jessie-backports/main Translation-en/DiffIndex
Err http://http.debian.net jessie-backports/main Sources
Hit http://archive.debian.org jessie Release
Ign http://archive.debian.org jessie Release
Err http://http.debian.net jessie-backports/main Sources
Ign http://archive.debian.org jessie/updates Release
Err http://http.debian.net jessie-backports/main Sources
Ign http://archive.debian.org jessie/main Sources/DiffIndex
Err http://http.debian.net jessie-backports/main Sources
404 Not Found
Err http://http.debian.net jessie-backports/main amd64 Packages
404 Not Found
Ign http://http.debian.net jessie-backports/main Translation-en_US
Ign http://http.debian.net jessie-backports/main Translation-en
Ign http://archive.debian.org jessie/non-free Sources/DiffIndex
Ign http://archive.debian.org jessie/contrib Sources/DiffIndex
Ign http://archive.debian.org jessie/main amd64 Packages/DiffIndex
Ign http://archive.debian.org jessie/non-free amd64 Packages/DiffIndex
Ign http://archive.debian.org jessie/contrib amd64 Packages/DiffIndex
Err http://httpredir.debian.org jessie-backports/main Sources
404 Not Found
Err http://httpredir.debian.org jessie-backports/main amd64 Packages
404 Not Found
Ign http://httpredir.debian.org jessie-backports/main Translation-en_US
Ign http://httpredir.debian.org jessie-backports/main Translation-en
Hit http://archive.debian.org jessie-backports/main Translation-en
Hit http://archive.debian.org jessie/contrib Translation-en
Hit http://archive.debian.org jessie/main Translation-en
Hit http://archive.debian.org jessie/non-free Translation-en
Hit http://archive.debian.org jessie-backports/main amd64 Packages
Hit http://archive.debian.org jessie/main Sources
Hit http://archive.debian.org jessie/non-free Sources
Hit http://archive.debian.org jessie/contrib Sources
Hit http://archive.debian.org jessie/main amd64 Packages
Hit http://archive.debian.org jessie/non-free amd64 Packages
Hit http://archive.debian.org jessie/contrib amd64 Packages
Ign http://archive.debian.org jessie/contrib Translation-en_US
Ign http://archive.debian.org jessie/main Translation-en_US
Ign http://archive.debian.org jessie/non-free Translation-en_US
Err http://archive.debian.org jessie/updates/main Sources
404 Not Found [IP: 130.89.148.13 80]
Err http://archive.debian.org jessie/updates/non-free Sources
404 Not Found [IP: 130.89.148.13 80]
Err http://archive.debian.org jessie/updates/contrib Sources
404 Not Found [IP: 130.89.148.13 80]
Err http://archive.debian.org jessie/updates/main amd64 Packages
404 Not Found [IP: 130.89.148.13 80]
Err http://archive.debian.org jessie/updates/non-free amd64 Packages
404 Not Found [IP: 130.89.148.13 80]
Err http://archive.debian.org jessie/updates/contrib amd64 Packages
404 Not Found [IP: 130.89.148.13 80]
Ign http://archive.debian.org jessie/updates/contrib Translation-en_US
Ign http://archive.debian.org jessie/updates/contrib Translation-en
Ign http://archive.debian.org jessie/updates/main Translation-en_US
Ign http://archive.debian.org jessie/updates/main Translation-en
Ign http://archive.debian.org jessie/updates/non-free Translation-en_US
Ign http://archive.debian.org jessie/updates/non-free Translation-en
Fetched 3,002 B in 13s (228 B/s)
W: GPG error: http://archive.debian.org jessie Release: The following signatures were invalid: KEYEXPIRED 1587841717
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-backports/main/source/Sources 404 Not Found
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://http.debian.net/debian/dists/jessie-backports/main/source/Sources 404 Not Found
W: Failed to fetch http://http.debian.net/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/main/source/Sources 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/non-free/source/Sources 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/contrib/source/Sources 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/main/binary-amd64/Packages 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/non-free/binary-amd64/Packages 404 Not Found [IP: 130.89.148.13 80]
W: Failed to fetch http://archive.debian.org/debian-security/dists/jessie/updates/contrib/binary-amd64/Packages 404 Not Found [IP: 130.89.148.13 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
答案1
您已向我们展示/etc/apt/sources.list
,但您还定义了很多其他 apt 存储库,因此这些存储库可能存在于 下的文件中/etc/apt/sources.list.d
。
Debian 8 太旧了,所有其他存储库不太可能仍支持它。它们可能应该被删除。
此外,debian-security 存储库尚未在 archive.debian.org 上,这就是您收到 404 Not Found 的原因。为此,您应该使用:
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
虽然现在不再受支持,所以仍然看不到任何更新,但它不会给出任何错误。
答案2
Debian 8 (Jessie) 长期支持终止
https://www.debian.org/News/2020/20200709
Debian 8 长期支持将于2020 年 7 月 9 日终止
Debian 长期支持 (LTS) 团队特此宣布,Debian 8“jessie”支持将于 2020 年 6 月 30 日终止,距其于 2015 年 4 月 26 日首次发布已有五年。Debian
将不再为 Debian 8 提供进一步的安全更新。“jessie”软件包的子集将由外部方支持。详细信息可在 Extended LTS 中找到。