Ubuntu 20.10 EOL 後如何升級?

Ubuntu 20.10 EOL 後如何升級?

我的桌面使用 Ubuntu 20.10 groovy。不幸的是它的壽命已經超過了。

根據EOL升級指南resources.list 變為:

deb http://old-releases.ubuntu.com/ubuntu/ groovy main restricted universe multiverse 
deb http://old-releases.ubuntu.com/ubuntu/ groovy-updates main restricted universe multiverse 
deb http://old-releases.ubuntu.com/ubuntu/ groovy-security main restricted universe multiverse

運行後我得到了這個日誌apt update

~ sudo apt-get update                   
[sudo] password for farhad: 
Hit:1 http://ppa.launchpad.net/atareao/atareao/ubuntu groovy InRelease                                                                                                           
Hit:2 ***                                                                                           
Ign:3 http://old-releases.ubuntu.com/ubuntu groovy InRelease                                                               
Hit:4 ***                                                        
Ign:5 http://old-releases.ubuntu.com/ubuntu groovy-updates InRelease                                                 
Hit:6 http://ppa.launchpad.net/atareao/atareao/ubuntu focal InRelease
Ign:7 http://old-releases.ubuntu.com/ubuntu groovy-security InRelease                          
Hit:8 ***                                
Err:9 http://old-releases.ubuntu.com/ubuntu groovy Release                                     
  404  Not Found [IP: 91.189.91.124 80]
Hit:10 http://ppa.launchpad.net/audio-recorder/ppa/ubuntu groovy InRelease
Err:11 http://old-releases.ubuntu.com/ubuntu groovy-updates Release      
  404  Not Found [IP: 91.189.91.124 80]
Err:12 http://old-releases.ubuntu.com/ubuntu groovy-security Release     
  404  Not Found [IP: 91.189.91.124 80]
Hit:13 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu groovy InRelease
Hit:14 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu focal InRelease
Hit:15 http://ppa.launchpad.net/kubuntu-ppa/beta/ubuntu groovy InRelease
Hit:16 http://ppa.launchpad.net/kubuntu-ppa/ppa/ubuntu groovy InRelease
Hit:17 http://ppa.launchpad.net/kubuntu-ppa/ppa/ubuntu focal InRelease
Reading package lists... Done                      '

E: The repository 'http://old-releases.ubuntu.com/ubuntu groovy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://old-releases.ubuntu.com/ubuntu groovy-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://old-releases.ubuntu.com/ubuntu groovy-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

似乎有些不對勁http://old-releases.ubuntu.com

我現在應該如何升級 Ubuntu 20.10?

PS:***儲存庫是第三方的,此處被截斷。

答案1

無需重新安裝或修改您的sources.list即可完成此操作。我能夠從 20.10 -> 21.04 -> 21.10 升級。

如果sudo do-release-upgrade像這樣運行失敗

請在升級之前安裝適用於您的版本的所有可用更新。

那你需要刪除 apt 的快取(損壞的連結)才能sudo apt upgrade成功。

sudo rm -rf /var/lib/apt/lists/*
sudo apt update
sudo apt upgrade

儘管如此,該sudo do-release-upgrade命令仍然會失敗,因為它不再有到 21.10 的直接路徑

此工具不支援從“groovy”升級到“impish”。

所以你可以使用這個解決方法先升級到21.04。

wget http://archive.ubuntu.com/ubuntu/dists/hirsute-updates/main/dist-upgrader-all/current/hirsute.tar.gz
mkdir upgrader
tar -xaf hirsute.tar.gz -C upgrader
cd upgrader
sudo ./hirsute

重新啟動到 21.04,apt update應該可以正常工作,但您最好升級到 21.10,以避免此問題。

sudo apt update && sudo apt upgrade
sudo do-release-upgrade

這是在 4 月發布 22.04 後堅持使用 LTS 的一個很好的理由。

答案2

由於某種原因http://old-releases.ubuntu.com/ubuntu/dists/未列出時髦的(20.10),雖然實際上已經停產自 2021 年 7 月 22 日起

所以你必須改old-releasesarchive來源.list:

sudo sed -i "s/old-releases/archive/g" /etc/apt/sources.list /etc/apt/sources.list.d/*.list
sudo apt-get update
sudo apt-get dist-upgrade

運行EOL版本是危險且無生產力的,因此建議將20.10(EOL)升級到21.04(實際,多毛)透過重新啟動機器並運行標準程序,例如

sudo do-release-upgrade

或者

update-manager -c

答案3

2023 更新:既然 20.10 已經 EOL,您確實需要修改您的sources.list.幸運的是這是好簡單

新增這3行使用/etc/apt/sources.list您最喜歡的終端編輯器(即sudo nano):

deb http://old-releases.ubuntu.com/ubuntu/ groovy main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ groovy-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ groovy-security main restricted universe multiverse

現在,運行這些命令您可以繼續更新過程。注意 - 我只是從同一頁上的黑客工程師的帖子中複製這些步驟,因為這對我來說非常有用。

sudo rm -rf /var/lib/apt/lists/*
sudo apt update
sudo apt upgrade
wget http://old-releases.ubuntu.com/ubuntu/dists/hirsute-updates/main/dist-upgrader-all/current/hirsute.tar.gz
mkdir upgrader
tar -xaf hirsute.tar.gz -C upgrader
cd upgrader
sudo ./hirsute

重啟

sudo do-release-upgrade

答案4

只需新增來源即可https://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/(或其他類似的)在 /etc/apt/sources.list 中的每個類別中,並且也保留原樣。進行全面更新和升級。在下一步中使用正常的升級程序。

我今天在 RPI 上做到了這一點,一切都很完美。

相關內容