本篇文章更新時間:2022/10/20
如有資訊過時或語誤之處,歡迎使用 Contact 功能通知。
一介資男的 LINE 社群開站囉!歡迎入群聊聊~
如果本站內容對你有幫助,歡迎使用 BFX Pay 加密貨幣 或 新台幣 贊助支持。
說實在,真的是沒在 Follow 這個資訊,記得(?)當初安裝系統的時候他是寫 LTS 長期支援版本,但這也太快就結束了吧XD
Ubuntu 21.10 (Impish Indri) End of Life reached on July 14 2022
這也算是第一次碰到直接 apt update
就噴錯無法更新的情況,來記錄一下升級過程。
錯誤訊息:
# apt update
Ign:1 http://mirrors.linode.com/ubuntu hirsute InRelease
Ign:2 http://mirrors.linode.com/ubuntu hirsute-updates InRelease
Ign:3 http://mirrors.linode.com/ubuntu hirsute-backports InRelease
Err:4 http://mirrors.linode.com/ubuntu hirsute Release
404 Not Found [IP: 2600:3c02:1::42e4:3f76 80]
Ign:5 http://security.ubuntu.com/ubuntu hirsute-security InRelease
Err:6 http://mirrors.linode.com/ubuntu hirsute-updates Release
404 Not Found [IP: 2600:3c02:1::42e4:3f76 80]
Err:7 http://mirrors.linode.com/ubuntu hirsute-backports Release
404 Not Found [IP: 2600:3c02:1::42e4:3f76 80]
Err:8 http://security.ubuntu.com/ubuntu hirsute-security Release
404 Not Found [IP: 2620:2d:4000:1::19 80]
Reading package lists... Done
E: The repository 'http://mirrors.linode.com/ubuntu hirsute Release' no longer has 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://mirrors.linode.com/ubuntu hirsute-updates Release' no longer has 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://mirrors.linode.com/ubuntu hirsute-backports Release' no longer has 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://security.ubuntu.com/ubuntu hirsute-security Release' no longer has 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.
不論是哪邊的主機都直接噴這樣類似的錯誤。
要升級到 Ubuntu 22.04 Server 之前,先要把當前狀態的軟體更新一下並取得更新的安裝檔案。
關鍵就是編輯 /etc/apt/sources.list
檔案,把原本的 source list 註解,並新增取代原本網域為 old-releases.ubuntu.com
的新存取資源位置。
deb http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ hirsute universe
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates universe
deb http://old-releases.ubuntu.com/ubuntu/ hirsute multiverse
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates multiverse
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-security main restricted
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-security universe
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-security multiverse
接著執行 apt update && apt upgrade -y && do-release-upgrade
指令。
如過是使用 SSH 遠端操作 VPS 的話,建議改由主機商提供的 console 工具來連線處理,不然這更新可能會導致連線作業中斷。
沒意外在一連串更新的問答中輸入「y
」,最後重新啟動系統就更新完成了!