Tentando atualizar o Ubuntu de 16.04 para 18.02

Tentando atualizar o Ubuntu de 16.04 para 18.02

Cada vez que executo o comando sudo apt-get updateou sudo apt upgraderecebo esta mensagem de erro:

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.

Estou trabalhando em uma máquina virtual (virtualbox)

Responder1

Parece que seu sources.listarquivo está faltando ou foi editado. Este é o arquivo que o Apt e os programas associados usam para determinar de onde baixar os pacotes. Por padrão, esse arquivo está localizado em /etc/apt/sources.list.

Abaixo, incluí o conteúdo padrão do sources.listarquivo, como era na versão 16.04, que encontreiaqui.

Cada linha começando com debaponta para um ppa/repositório usado pelo apt para recuperar pacotes binários. No arquivo stock, cada uma dessas linhas deve ser seguida por outra linha, imediatamente abaixo dela, que parece quase idêntica, mas começa com deb-src. É aqui que os pacotes de código-fonte usados apt source​​são armazenados. Juntas, essas linhas fornecem o conteúdo para apt-cache. Quando você executa sudo apt update, esses são os endpoints a partir dos quais o cache do Apt é atualizado. Quando você usa o apt para baixar conteúdo, é daí que ele vem.

#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

Suponho que se você salvasse isso em um arquivo e diffcomparasse com o seu arquivo atual sources.list, haveria discrepâncias. Pelas informações que você forneceu, parece que sua cópia tem uma linha que se refere a https://download.sublimetext.com/apt/stable/Packages. A maneira mais fácil de corrigir seu erro é provavelmente encontrar essa linha e comentá-la adicionando uma hashtag ('#') até o início da linha. Caso você tenha um motivo para manter esse repositório ativo por qualquer motivo, você sempre pode desfazer esta etapa após a atualização, removendo a hashtag. (assumindo que a atualização não reescreve o arquivo quando o apt é atualizado). qualquer linha 'deb' ou 'deb-src' no arquivo.

Depois de salvar, você precisará executar:

sudo apt-get update

para ficar apto a perceber a mudança. O mesmo será válido para quaisquer alterações feitas neste arquivo.

Se isso não funcionar, eu recomendaria adicionar um'#'no início de cada linha que ainda não possui uma e, abaixo dela, copie e cole o conteúdo do estoque acima, diretamente abaixo dela.

Isso terá o efeito de reverter seu ppas para a configuração de estoque e corrigir seu comando uprade. Perceber

informação relacionada