오래된 ubuntu버전 사용 시 apt command 동작 안하는 이슈 수정
IT 지식/Linux

오래된 ubuntu버전 사용 시 apt command 동작 안하는 이슈 수정

반응형

라즈베리 파이에 예전에 설치한 우분투에 jdk를 설치하기 위해서 sudo apt-get update를 진행하였으나 계속 아래 에러를 내뱉고 실패했다. ㅜㅜ

"/etc/apt/sources.list" 49L, 2861B                                                                                                                                                                                                  49,75        모두
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
무시:1 http://ports.ubuntu.com/ubuntu-ports hirsute InRelease
무시:2 http://ports.ubuntu.com/ubuntu-ports hirsute-updates InRelease
무시:3 http://ports.ubuntu.com/ubuntu-ports hirsute-backports InRelease
무시:4 http://ports.ubuntu.com/ubuntu-ports hirsute-security InRelease
오류:5 http://ports.ubuntu.com/ubuntu-ports hirsute Release
  404  Not Found [IP: 185.125.190.39 80]
오류:6 http://ports.ubuntu.com/ubuntu-ports hirsute-updates Release
  404  Not Found [IP: 185.125.190.39 80]
오류:7 http://ports.ubuntu.com/ubuntu-ports hirsute-backports Release
  404  Not Found [IP: 185.125.190.39 80]
오류:8 http://ports.ubuntu.com/ubuntu-ports hirsute-security Release
  404  Not Found [IP: 185.125.190.39 80]
패키지 목록을 읽는 중입니다... 완료
E: The repository 'http://ports.ubuntu.com/ubuntu-ports hirsute 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 hirsute-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 hirsute-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 hirsute-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.
wedul@wedul-desktop:~$ ping www.naver.com

 

통신이 안되길래 dns가 잘못된거라 생각해서 nameserver를 8.8.8.8이나 8.8.4.4를 추가해줬으나 동일하게 오류가 발생했다.

업데이트 서버가 잘못되었나 싶어서 구글링에서 찾은 http://mirror.kakao.com/ubuntu를 추가했으나 동일하게 오류가 발생했다.

 

찾아보니 오래된 우분투 버전에서는 업데이트 서버를 따로 관리하는 곳이 있다고 하는데 이게 http://old-releases.ubuntu.com/ubuntu/이다.

 

그럼 /etc/apt/sources.list를 수정하고 다시 시도해보자.

"/etc/apt/sources.list" 49L, 2881B                                                                                                                                                                                                  49,75        모두
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute-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/ hirsute universe
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute universe
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates universe
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute-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/ hirsute multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute multiverse
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu hirsute partner
# deb-src http://archive.canonical.com/ubuntu hirsute partner

deb http://old-releases.ubuntu.com/ubuntu/ hirsute-security main restricted
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute-security main restricted
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-security universe
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute-security universe
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-security multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ hirsute-security multiverse
~

 

편하게 하려면 sudo sed -i 's/ports.ubuntu.com\/ubuntu-ports/old-releases.ubuntu.com\/ubuntu/g' /etc/apt/sources.list 를 수행하면 편하다.

 

 

정상수행 완료!

반응형