環境
HW:Raspberry PI 4 Model B (4GB)
OS:Ubuntu 19.10 (Eoan Ermine)
apt-get ができない
パッケージの最新化をしようと、apt-get updateを実行しようとしたところ、Not Foundと表示され実行できなかった。
色々と調べてみると、OSのサポート切れに伴い、リポジトリの場所が変更されたことが原因。
apt-get update
Hit:1 http://ppa.launchpad.net/paskal-07/softethervpn/ubuntu eoan InRelease
Ign:2 http://ports.ubuntu.com/ubuntu-ports eoan InRelease
Ign:3 http://ports.ubuntu.com/ubuntu-ports eoan-updates InRelease
Ign:4 http://ports.ubuntu.com/ubuntu-ports eoan-backports InRelease
Ign:5 http://ports.ubuntu.com/ubuntu-ports eoan-security InRelease
Err:6 http://ports.ubuntu.com/ubuntu-ports eoan Release
404 Not Found [IP: 91.189.88.142 80]
Err:7 http://ports.ubuntu.com/ubuntu-ports eoan-updates Release
404 Not Found [IP: 91.189.88.142 80]
Err:8 http://ports.ubuntu.com/ubuntu-ports eoan-backports Release
404 Not Found [IP: 91.189.88.142 80]
Err:9 http://ports.ubuntu.com/ubuntu-ports eoan-security Release
404 Not Found [IP: 91.189.88.142 80]
Reading package lists... Done
E: The repository 'http://ports.ubuntu.com/ubuntu-ports eoan 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://ports.ubuntu.com/ubuntu-ports eoan-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://ports.ubuntu.com/ubuntu-ports eoan-backports 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://ports.ubuntu.com/ubuntu-ports eoan-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.
表示された内容から、リポジトリのURLにアクセスしてみると、今使っているUbuntuの名称「eoan」のフォルダがないことが分かった。
http://ports.ubuntu.com/ubuntu-ports/dists/
解決方法
Ubuntuのサポートが終了し、リポジトリが変更されたのが原因。「ports」となっているところを「old-release」に変更する。
変更するファイルは/etc/apt/sources.list
です。
変更前に、下記URLにアクセスしてみると、「ubuntu-ports」となっているディレクトリが存在していなかった。
http://old-releases.ubuntu.com/
存在するディレクトリにパスを変更する
変更前:http://ports.ubuntu.com/ubuntu-ports
変更後://old-releases.ubuntu.com/ubuntu
変更したファイルは下記の通り。
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://old-releases.ubuntu.com/ubuntu/ eoan main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu/ eoan main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ eoan-updates main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu/ eoan-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ eoan universe
# deb-src http://old-releases.ubuntu.com/ubuntu/ eoan universe
deb http://old-releases.ubuntu.com/ubuntu/ eoan-updates universe
# deb-src http://old-releases.ubuntu.com/ubuntu/ eoan-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu/ eoan multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ eoan multiverse
deb http://old-releases.ubuntu.com/ubuntu/ eoan-updates multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ eoan-updates multiverse
(以下省略)
参考
変更前のファイルは下記の通り。
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ports.ubuntu.com/ubuntu-ports eoan main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports eoan main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ports.ubuntu.com/ubuntu-ports eoan-updates main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports eoan-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports eoan universe
# deb-src http://ports.ubuntu.com/ubuntu-ports eoan universe
deb http://ports.ubuntu.com/ubuntu-ports eoan-updates universe
# deb-src http://ports.ubuntu.com/ubuntu-ports eoan-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ports.ubuntu.com/ubuntu-ports eoan multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports eoan multiverse
deb http://ports.ubuntu.com/ubuntu-ports eoan-updates multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports eoan-updates multiverse
(以下省略)