22 votos

Su sistema no puede acceder al almacén de snap

Traté de actualizar mi Windows ubuntu subsistema a 18.10 utilizando esta instrucción: https://linuxconfig.org/how-to-upgrade-ubuntu-to-18-10-cosmic-cuttlefish#h9-how-to-upgrade-ubuntu-the-debian-way

Pero dentro de la actualización me aparece este error:

 Your system is unable to reach the snap store, please make sure you're connected to the Internet and update any   
  firewall or proxy settings as needed so that you can reach the snap store.                                        

  You can manually check for connectivity by running "snap info lxd"                                                

  Aborting will cause the upgrade to fail and will require it to be re-attempted once snapd is functional on the    
  system.                                                                                                           

  Unable to reach the snap store

Mi cortafuegos está desactivado para no veo ninguna razón, por qué esto no funcionaría.

También he intentado ejecutar snap info lxd pero

Interacting with snapd is not yet supported on Windows Subsystem for Linux.
This command has been left available for documentation purposes only.

Aquí está el mensaje completo en la línea de comandos, al intentar ejecutar la actualización:

The following additional packages will be installed:
  lxd
The following packages will be upgraded:
  lxd
1 upgraded, 0 newly installed, 0 to remove and 227 not upgraded.
180 not fully installed or removed.
Need to get 0 B/11.1 kB of archives.
After this operation, 20.5 MB disk space will be freed.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 61051 files and directories currently installed.)
Preparing to unpack .../archives/lxd_1%3a0.4_all.deb ...
invoke-rc.d: could not determine current runlevel
Stopping Container hypervisor based on LXC: (not running).
=> Installing the LXD snap
==> Checking connectivity with the snap store
===> Unable to contact the store
===> Aborting at user request
dpkg: error processing archive /var/cache/apt/archives/lxd_1%3a0.4_all.deb (--unpack):
 new lxd package pre-installation script subprocess returned error exit status 1
invoke-rc.d: could not determine current runlevel
Errors were encountered while processing:
 /var/cache/apt/archives/lxd_1%3a0.4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

¿Alguna idea de cómo puedo solucionarlo? El subsistema tiene conexión a Internet, así que no estoy seguro, ¿por qué no puede conectarse a la tienda de snap

30voto

radke Puntos 386

Este problema con microsoft WSL lo hizo funcionar completamente para mí. Esencialmente se reducía a:

  1. Abortar el do-release-upgrade script

  2. Relanzar Ubuntu

  3. Quitar lxd con: sudo dpkg --force depends -P lxd; sudo dpkg --force depends -P lxd-client

  4. Termine con sudo apt upgrade

8voto

Daniel K. Puntos 137

Me encontré con el mismo problema y encontré esta pregunta.

Hasta ahora, la única respuesta requiere abortar el do-release-upgrade script. No quiero esto.

He aquí la solución:

Cuando el mensaje de error de lxd apareció, se le dan tres opciones, una de ellas es omitir .

Después de elegir omitir Aparece el siguiente mensaje:

Skipping is not allowed when LXD has been initialized                                                                                                                  
LXD appears to have been configured on this system.
Please stop LXD and remove local data in /var/lib/lxd/ if  
you would like to skip installing the LXD snap and migrating the local data.                                    
                                     <Ok>

Así que PRIMERO , abrí otra ventana de Ubuntu Shell e introduje: sudo /etc/init.d/lxd stop La respuesta fue Stopping Container hypervisor based on LXC: (not running).

Entonces SEGUNDO He borrado el directorio indicado en el mensaje: sudo rm -rf /var/lib/lxd

ÚLTIMO , volví a la primera ventana de Ubuntu Shell y pulsé retorno. Y elegí skip de nuevo. Esta vez la instalación continuó.

0voto

HansW Puntos 1

El método JBCP me ha funcionado muy bien. Una pequeña diferencia: Detuve lxd y eliminé /var/lib/lxd antes de ejecutar do-release-upgrade. Ahora podía simplemente pulsar "skip" cuando el sistema llegaba a ese punto. Sin Windows ni pasos adicionales. Muchas gracias aunque no lo hubiera encontrado.

EnMiMaquinaFunciona.com

EnMiMaquinaFunciona es una comunidad de administradores de sistemas en la que puedes resolver tus problemas y dudas.
Puedes consultar las preguntas de otros sysadmin, hacer tus propias preguntas o resolver las de los demás.

Powered by:

X