ubuntu 無法更新

 若下 apt update指令出現下列訊息,無法更新

Ign:1 http://archive.ubuntu.com/ubuntu mantic InRelease

Ign:2 http://archive.ubuntu.com/ubuntu mantic-updates InRelease

Ign:3 http://archive.ubuntu.com/ubuntu mantic-security InRelease

Err:4 http://archive.ubuntu.com/ubuntu mantic Release

  404  Not Found [IP: 185.125.190.83 80]

Err:5 http://archive.ubuntu.com/ubuntu mantic-updates Release

  404  Not Found [IP: 185.125.190.83 80]

Err:6 http://archive.ubuntu.com/ubuntu mantic-security Release

  404  Not Found [IP: 185.125.190.83 80]

Reading package lists... Done

E: The repository 'http://archive.ubuntu.com/ubuntu mantic 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://archive.ubuntu.com/ubuntu mantic-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://archive.ubuntu.com/ubuntu mantic-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.

解決方式:
 vim /etc/apt/sources.list
刪除其中的所有行,然後將以下內容複製並貼上到文件編輯器中:
deb http://archive.ubuntu.com/ubuntu focal main universe multiverse restricted
deb http://security.ubuntu.com/ubuntu/ focal-security main multiverse universe restricted
deb http://archive.ubuntu.com/ubuntu focal-updates main multiverse universe restricted
存檔
即可順利進行更新


這個網誌中的熱門文章

公務雲出現「系統發生錯誤」或「系統單登中」或「空白畫面」

二代公文系統設定