Intentando actualizar Ubuntu de 16.04 a 18.02

Intentando actualizar Ubuntu de 16.04 a 18.02

Cada vez que ejecuto el comando sudo apt-get updateo sudo apt upgrade, aparece este mensaje de error:

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.

Estoy trabajando en una máquina virtual (virtualbox)

Respuesta1

Parece que su sources.listarchivo falta o ha sido editado. Este es el archivo que Apt y los programas asociados utilizan para determinar desde dónde descargar los paquetes. De forma predeterminada, este archivo se encuentra en /etc/apt/sources.list.

A continuación, he incluido el contenido predeterminado para el sources.listarchivo, tal como estaba en la versión 16.04, que encontréaquí.

Cada línea que comienza con debapunta a un ppa/repositorio utilizado por apt para recuperar paquetes binarios. En el archivo de stock, cada una de estas líneas debe ir seguida de otra línea, inmediatamente debajo, que parece casi idéntica, pero que en su lugar comienza con deb-src. Aquí es donde apt sourcese almacenan los paquetes de código fuente utilizados . Juntas, estas líneas proporcionan el contenido de apt-cache. Cuando ejecuta sudo apt update, estos son los puntos finales desde los que se actualiza la caché de Apt. Cuando usas apt para descargar contenido, este es de donde proviene.

#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

Supongo que si guardara esto en un archivo y difflo comparara con el actual sources.list, habría discrepancias. Según la información que proporcionaste, parece que tu copia tiene una línea que hace referencia a https://download.sublimetext.com/apt/stable/Packages. La forma más sencilla de corregir el error probablemente sea encontrar esa línea y comentarla agregando un hashtag ('#') hasta el principio de la línea. En caso de que tenga una razón para mantener ese repositorio activo por cualquier motivo, siempre puede deshacer este paso después de la actualización eliminando el hashtag (asumiendo que la actualización no reescribe el archivo cuando se actualiza apt). cualquier línea 'deb' o 'deb-src' del archivo.

Después de guardar, deberá ejecutar:

sudo apt-get update

para llegar a ser apto para notar el cambio. Lo mismo ocurrirá con cualquier cambio que realice en este archivo.

Si esto no funciona, recomendaría agregar un'#'al principio de cada línea que aún no tenga una, y luego debajo de ella, copie y pegue el contenido de stock desde arriba directamente debajo de ella.

Esto tendrá el efecto de revertir sus ppas a la configuración original y corregir su comando uprade. Aviso

información relacionada