Ubuntu를 16.04에서 18.02로 업데이트하려고 합니다.

Ubuntu를 16.04에서 18.02로 업데이트하려고 합니다.

sudo apt-get update또는 명령을 실행할 때마다 sudo apt upgrade다음 오류 메시지가 나타납니다.

W: The repository 'https://download.sublimetext.com apt/stable/ Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://download.sublimetext.com/apt/stable/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
E: Some index files failed to download. They have been ignored, or old ones used instead.

저는 가상 머신(virtualbox)에서 작업하고 있습니다.

답변1

sources.list파일이 누락되었거나 편집된 것 같습니다 . 이는 Apt 및 관련 프로그램이 패키지를 다운로드할 위치를 결정하는 데 사용하는 파일입니다. 기본적으로 이 파일은 에 있습니다 /etc/apt/sources.list.

sources.list아래에는 버전 16.04와 마찬가지로 파일 의 기본 콘텐츠가 포함되어 있습니다.여기.

로 시작하는 각 줄은 debapt가 바이너리 패키지를 검색하는 데 사용하는 ppa/저장소를 가리킵니다. 스톡 파일에서 이러한 각 줄 바로 아래에 다른 줄이 와야 합니다. 이 줄은 거의 동일해 보이지만 대신 deb-src. 여기에는 에서 사용하는 소스 코드 패키지가 apt source저장됩니다. 이 줄은 함께 의 콘텐츠를 제공합니다 apt-cache. 을 실행하면 sudo apt updateApt 캐시가 업데이트되는 엔드포인트가 됩니다. 콘텐츠를 다운로드하기 위해 apt를 사용하면 콘텐츠가 나오는 곳이 바로 여기입니다.

#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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://us.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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://us.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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 xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

나는 이것을 파일에 저장하고 diff현재 에 대해 저장한다면 sources.list불일치가 있을 것이라고 추측합니다. 제공하신 정보에 따르면 사본에 를 참조하는 줄이 있는 것 같습니다 https://download.sublimetext.com/apt/stable/Packages. 오류를 수정하는 가장 쉬운 방법은 아마도 해당 줄을 찾아 해시태그('#') 줄의 시작 부분까지. 어떤 이유로든 해당 저장소를 활성 상태로 유지해야 할 이유가 있는 경우 해시태그를 제거하여 업그레이드 후 언제든지 이 단계를 실행 취소할 수 있습니다.(apt가 업그레이드될 때 업그레이드가 파일을 다시 쓰지 않는다고 가정) 파일의 'deb' 또는 'deb-src' 줄.

저장한 후에는 다음을 실행해야 합니다.

sudo apt-get update

변화를 알아채는 경향이 있습니다. 이 파일을 변경하는 경우에도 마찬가지입니다.

그래도 작동하지 않으면 다음을 추가하는 것이 좋습니다.'#'아직 없는 각 줄의 시작 부분에 복사한 다음 그 아래에 바로 아래에 있는 스톡 콘텐츠를 복사하여 붙여넣습니다.

이렇게 하면 ppa를 기본 구성으로 되돌리고 업그레이드 명령을 수정하는 효과가 있습니다. 알아채다

관련 정보