I am using ubuntu 20.10 on my system . I’ve an error for 2 days. I couldnt update-upgrade or sudo apt update or sudo apt-get update or package install on my system I get below errors:
Hit:1 http://packages.microsoft.com/repos/code stable InRelease
Hit:2 http://archive.canonical.com/ubuntu focal InRelease
Hit:3 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Hit:4 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:5 http://old-releases.ubuntu.com/ubuntu focal InRelease
Ign:6 http://old-releases.ubuntu.com/ubuntu focal-updates InRelease
Hit:7 http://ppa.launchpad.net/kicad/kicad-5.1-releases/ubuntu focal InRelease
Hit:8 https://deb.opera.com/opera-stable stable InRelease
Hit:9 https://packages.microsoft.com/repos/vscode stable InRelease
Ign:10 http://old-releases.ubuntu.com/ubuntu focal-backports InRelease
Ign:11 http://ppa.launchpad.net/team-gcc-arm-embedded/ppa/ubuntu focal InRelease
Ign:12 http://old-releases.ubuntu.com/ubuntu focal-security InRelease
Err:14 http://old-releases.ubuntu.com/ubuntu focal Release
404 Not Found [IP: 91.189.88.247 80]
Err:15 http://ppa.launchpad.net/team-gcc-arm-embedded/ppa/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
Err:16 http://old-releases.ubuntu.com/ubuntu focal-updates Release
404 Not Found [IP: 91.189.88.247 80]
Hit:17 https://linux-clients.seafile.com/seafile-deb/focal stable InRelease
Err:18 http://old-releases.ubuntu.com/ubuntu focal-backports Release
404 Not Found [IP: 91.189.88.247 80]
Err:19 http://old-releases.ubuntu.com/ubuntu focal-security Release
404 Not Found [IP: 91.189.88.247 80]
Ign:13 https://launchpad.net/~terry.guo/+archive/gcc-arm-embedded focal InRelease
Err:20 https://launchpad.net/~terry.guo/+archive/gcc-arm-embedded focal Release
404 Not Found [IP: 91.189.89.222 443]
Reading package lists... Done
原因
每一个Ubuntu发布版本都有它的结束时间,通常,Ubuntu发布版本支持18个月,而LTS (Long Term Support)(长期支持)版本分别支持3年(服务器版)和5年(桌面版)。当一个Ubuntu发布版本到达结束期后,它的库将不再能够访问,并且你也不会得到任何维护更新和安全补丁。
如果你使用的是Ubuntu系统到达结束期了,你使用 apt-get or aptitude 更新库时会得到如上错误提示.
对于那些使用旧版本的Ubuntu的用户,Canonical会维护 old-releases.ubuntu.com ,这是一个过期库的归档。因此,当Canonical支持的Ubuntu过期后,你必须把源切换到 old-releases.ubuntu.com, 或者 进行升级。
解决方式
1, 系统升级
sudo do-release-upgrade
14p-Gen-2:/etc/apt$ sudo do-release-upgrade
正在检查新版 Ubuntu
不再提供您的 Ubuntu 版本的支持。
要获得关于升级的信息,请访问:
http://www.ubuntu.com/releaseendoflife
= Welcome to Ubuntu 22.04 'Jammy Jellyfish' =
The Ubuntu team is proud to announce Ubuntu 22.04 'Jammy Jellyfish'.
To see what's new in this release, visit:
https://wiki.ubuntu.com/JammyJellyfish/ReleaseNotes
Ubuntu is a Linux distribution for your desktop or server, with a fast
and easy install, regular releases, a tight selection of excellent
applications installed by default, and almost any other software you
can imagine available through the network.
We hope you enjoy Ubuntu.
== Feedback and Helping ==
If you would like to help shape Ubuntu, take a look at the list of
ways you can participate at
http://www.ubuntu.com/community/participate/
Your comments, bug reports, patches and suggestions will help ensure
that our next release is the best release of Ubuntu ever. If you feel
that you have found a bug please read:
http://help.ubuntu.com/community/ReportingBugs
Then report bugs using apport in Ubuntu. For example:
ubuntu-bug linux
will open a bug report in Launchpad regarding the linux package.
If you have a question, or if you think you may have found a bug but
aren't sure, first try asking on the #ubuntu or #ubuntu-bugs IRC
channels on Libera.Chat, on the Ubuntu Users mailing list, or on the
Ubuntu forums:
http://help.ubuntu.com/community/InternetRelayChat
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
http://www.ubuntuforums.org/
== More Information ==
........
% [正在连接 archive.ubuntu.com (91.189.91.38)] 0% [已连接到 archive.ubuntu.com (91.189.91.39)] 0% [正在等待报头] 获取:1 升级工具签名 [819 B]
99% [正在等待报头] 获取:2 升级工具 [1,267 kB]
100% [执行中] 已下载 1,268 kB / 0秒 (0 B/s)
使用 'jammy.tar.gz.gpg' 对 'jammy.tar.gz' 进行验证
正在提取 'jammy.tar.gz'
2, Update Packages Url
cd /etc/apt
# 备份 文件 sources.list
sudo cp sources.list sources.list.bak
sudo rm -fr sources.list
sudo vi sources.list
### add
deb http://old-releases.ubuntu.com/ubuntu/ groovy main restricted
deb http://old-releases.ubuntu.com/ubuntu/ groovy multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ groovy-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ groovy-updates multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ groovy-backports main restricted
deb http://old-releases.ubuntu.com/ubuntu/ groovy-backports multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ groovy-security main restricted
deb http://old-releases.ubuntu.com/ubuntu/ groovy-security multiverse universe
That’s it. Now you can update your sources again.
sudo apt-get update