우분투 apt-get update 404 not found 오류 해결 방법

리눅스

우분투를 서버로 사용하다가 오랜만에 업데이트를 하려는 경우 다음과 같은 404 not found 오류와 함께 진행이 되지 않는 경우가 있습니다.

이 문제는 현재 사용하고 있는 우분투 버전의 업데이트 지원이 끝나 해당 버전의 패키지 저장소(Repository) 페이지가 이전 버전 아카이브 페이지인 http://old-releases.ubuntu.com/releases/ 로 이동되어 패키지 정보를 받아올 수 없는 경우인데요.

Hit:1 http://ppa.launchpad.net/nginx/development/ubuntu zesty InRelease
Ign:2 http://archive.ubuntu.com/ubuntu zesty InRelease
Ign:3 http://security.ubuntu.com/ubuntu zesty-security InRelease
Ign:4 http://archive.ubuntu.com/ubuntu zesty-updates InRelease
Hit:5 http://ppa.launchpad.net/nginx/stable/ubuntu zesty InRelease
Ign:6 http://archive.ubuntu.com/ubuntu zesty-backports InRelease
Err:7 http://archive.ubuntu.com/ubuntu zesty Release
404 Not Found [IP: 2001:67c:1360:8001::21 80]
Err:8 http://security.ubuntu.com/ubuntu zesty-security Release
404 Not Found [IP: 2001:67c:1360:8001::21 80]
Err:9 http://archive.ubuntu.com/ubuntu zesty-updates Release
404 Not Found [IP: 2001:67c:1360:8001::21 80]
Err:10 http://archive.ubuntu.com/ubuntu zesty-backports Release
404 Not Found [IP: 2001:67c:1360:8001::21 80]
Reading package lists… Done
E: The repository ‘http://archive.ubuntu.com/ubuntu zesty Release’ does no longer 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://security.ubuntu.com/ubuntu zesty-security Release’ does no longer 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://archive.ubuntu.com/ubuntu zesty-updates Release’ does no longer 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://archive.ubuntu.com/ubuntu zesty-backports Release’ does no longer 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.

우분투 지원이 끊긴 경우

sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade

위 명령어로 /etc/apt/sources.list 에서 지정된 저장소 주소를 우분투 이전 버전 모음 아카이브 페이지로 변경한 다음 업데이트 합니다.

sudo do-release-upgrade

지원이 끝난 상태기 떄문에 보안 업데이트 또한 진행되지 않으며 소프트웨어의 호환성 문제가 아니라면 되도록 우분투 상위 버전으로 업그레이드 하는 것이 좋습니다.

다음(Daum) 저장소 사용시

국내 우분투 미러 사이트인 다음(Daum)을 Repository로 사용한 경우 카카오로 도메인이 리디렉션 되면서 생기는 문제도 있습니다.

위 주소를 참고로 /etc/apt/sources.list 에 지정된 주소를 변경하면 되겠습니다.

1 댓글. Leave new

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

Fill out this field
Fill out this field
유효한 이메일 주소를 입력해주세요.

우분투 컴퓨터 이름 Hostname 변경하는 방법
우분투 컴퓨터 이름 hostname 변경하는 방법
우분투에서 터미널을 열거나 네트워크 공유를 사용해야할 때 표시되는 컴퓨터 이름은 hostname이라고 불리며 hostname을 변경하면 우분투에 표시되는 컴퓨터 이름을 지정할 수…