Aquí hay algunos detalles

Aquí hay algunos detalles

Creé una nueva máquina virtual usando la función de creación rápida en Hyper-V en Windows 10.

Una vez que la máquina virtual estuvo configurada (seleccioné la configuración de idioma, creé una contraseña, etc.), intenté instalar Visual Studio Code y recibí el siguiente mensaje de error: Unable to install "Visual Studio Code": too early for operation, device not yet seeded or device model not acknowledged.

Según la investigación, esto parece ser un problema instantáneo.

Aquí hay algunos detalles

snap --version:

snap    2.38
snapd   2.38
series  16
ubuntu  18.04
kernel  4.15.0-50-generic

snap changes:

ID   Status  Spawn               Ready               Summary
1    Doing   today at 10:58 BST  -                   Initialize system state
2    Done    today at 10:58 BST  today at 10:58 BST  Initialize device

snap tasks --last=seed:

Status  Spawn               Ready               Summary
Done    today at 10:58 BST  today at 10:58 BST  Ensure prerequisites for "core" are available
Done    today at 10:58 BST  today at 10:58 BST  Prepare snap "/var/lib/snapd/seed/snaps/core_6673.snap" (6673)
Done    today at 10:58 BST  today at 10:58 BST  Mount snap "core" (6673)
Done    today at 10:58 BST  today at 10:58 BST  Copy snap "core" data
Done    today at 10:58 BST  today at 10:58 BST  Setup snap "core" (6673) security profiles
Done    today at 10:58 BST  today at 10:58 BST  Make snap "core" (6673) available to the system
Done    today at 10:58 BST  today at 10:59 BST  Automatically connect eligible plugs and slots of snap "core"
Done    today at 10:58 BST  today at 10:59 BST  Set automatic aliases for snap "core"
Done    today at 10:58 BST  today at 10:59 BST  Setup snap "core" aliases
Done    today at 10:58 BST  today at 10:59 BST  Run install hook of "core" snap if present
Done    today at 10:58 BST  today at 10:59 BST  Start snap "core" (6673) services
Done    today at 10:58 BST  today at 10:59 BST  Run configure hook of "core" snap if present
Done    today at 10:58 BST  today at 10:59 BST  Ensure prerequisites for "gnome-3-26-1604" are available
Done    today at 10:58 BST  today at 10:59 BST  Prepare snap "/var/lib/snapd/seed/snaps/gnome-3-26-1604_82.snap" (82)
Done    today at 10:58 BST  today at 10:59 BST  Mount snap "gnome-3-26-1604" (82)
Done    today at 10:58 BST  today at 10:59 BST  Copy snap "gnome-3-26-1604" data
Done    today at 10:58 BST  today at 10:59 BST  Setup snap "gnome-3-26-1604" (82) security profiles
Done    today at 10:58 BST  today at 10:59 BST  Make snap "gnome-3-26-1604" (82) available to the system
Done    today at 10:58 BST  today at 10:59 BST  Automatically connect eligible plugs and slots of snap "gnome-3-26-1604"
Done    today at 10:58 BST  today at 10:59 BST  Set automatic aliases for snap "gnome-3-26-1604"
Done    today at 10:58 BST  today at 10:59 BST  Setup snap "gnome-3-26-1604" aliases
Done    today at 10:58 BST  today at 10:59 BST  Run install hook of "gnome-3-26-1604" snap if present
Done    today at 10:58 BST  today at 10:59 BST  Start snap "gnome-3-26-1604" (82) services
Done    today at 10:58 BST  today at 10:59 BST  Run configure hook of "gnome-3-26-1604" snap if present
Doing   today at 10:58 BST  -                   Ensure prerequisites for "gnome-calculator" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gnome-calculator_352.snap" (352)
Do      today at 10:58 BST  -                   Mount snap "gnome-calculator" (352)
Do      today at 10:58 BST  -                   Copy snap "gnome-calculator" data
Do      today at 10:58 BST  -                   Setup snap "gnome-calculator" (352) security profiles
Do      today at 10:58 BST  -                   Make snap "gnome-calculator" (352) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gnome-calculator"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gnome-calculator"
Do      today at 10:58 BST  -                   Setup snap "gnome-calculator" aliases
Do      today at 10:58 BST  -                   Run install hook of "gnome-calculator" snap if present
Do      today at 10:58 BST  -                   Start snap "gnome-calculator" (352) services
Do      today at 10:58 BST  -                   Run configure hook of "gnome-calculator" snap if present
Do      today at 10:58 BST  -                   Ensure prerequisites for "gnome-characters" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gnome-characters_206.snap" (206)
Do      today at 10:58 BST  -                   Mount snap "gnome-characters" (206)
Do      today at 10:58 BST  -                   Copy snap "gnome-characters" data
Do      today at 10:58 BST  -                   Setup snap "gnome-characters" (206) security profiles
Do      today at 10:58 BST  -                   Make snap "gnome-characters" (206) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gnome-characters"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gnome-characters"
Do      today at 10:58 BST  -                   Setup snap "gnome-characters" aliases
Do      today at 10:58 BST  -                   Run install hook of "gnome-characters" snap if present
Do      today at 10:58 BST  -                   Start snap "gnome-characters" (206) services
Do      today at 10:58 BST  -                   Run configure hook of "gnome-characters" snap if present
Do      today at 10:58 BST  -                   Ensure prerequisites for "gnome-logs" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gnome-logs_57.snap" (57)
Do      today at 10:58 BST  -                   Mount snap "gnome-logs" (57)
Do      today at 10:58 BST  -                   Copy snap "gnome-logs" data
Do      today at 10:58 BST  -                   Setup snap "gnome-logs" (57) security profiles
Do      today at 10:58 BST  -                   Make snap "gnome-logs" (57) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gnome-logs"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gnome-logs"
Do      today at 10:58 BST  -                   Setup snap "gnome-logs" aliases
Do      today at 10:58 BST  -                   Run install hook of "gnome-logs" snap if present
Do      today at 10:58 BST  -                   Start snap "gnome-logs" (57) services
Do      today at 10:58 BST  -                   Run configure hook of "gnome-logs" snap if present
Do      today at 10:58 BST  -                   Ensure prerequisites for "gnome-system-monitor" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gnome-system-monitor_70.snap" (70)
Do      today at 10:58 BST  -                   Mount snap "gnome-system-monitor" (70)
Do      today at 10:58 BST  -                   Copy snap "gnome-system-monitor" data
Do      today at 10:58 BST  -                   Setup snap "gnome-system-monitor" (70) security profiles
Do      today at 10:58 BST  -                   Make snap "gnome-system-monitor" (70) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gnome-system-monitor"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gnome-system-monitor"
Do      today at 10:58 BST  -                   Setup snap "gnome-system-monitor" aliases
Do      today at 10:58 BST  -                   Run install hook of "gnome-system-monitor" snap if present
Do      today at 10:58 BST  -                   Start snap "gnome-system-monitor" (70) services
Do      today at 10:58 BST  -                   Run configure hook of "gnome-system-monitor" snap if present
Do      today at 10:58 BST  -                   Ensure prerequisites for "gtk-common-themes" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gtk-common-themes_1198.snap" (1198)
Do      today at 10:58 BST  -                   Mount snap "gtk-common-themes" (1198)
Do      today at 10:58 BST  -                   Copy snap "gtk-common-themes" data
Do      today at 10:58 BST  -                   Setup snap "gtk-common-themes" (1198) security profiles
Do      today at 10:58 BST  -                   Make snap "gtk-common-themes" (1198) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gtk-common-themes"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gtk-common-themes"
Do      today at 10:58 BST  -                   Setup snap "gtk-common-themes" aliases
Do      today at 10:58 BST  -                   Run install hook of "gtk-common-themes" snap if present
Do      today at 10:58 BST  -                   Start snap "gtk-common-themes" (1198) services
Do      today at 10:58 BST  -                   Run configure hook of "gtk-common-themes" snap if present
Do      today at 10:58 BST  -                   Mark system seeded

......................................................................
Make snap "core" (6673) available to the system

2019-05-17T10:58:58+01:00 INFO Requested daemon restart.

......................................................................
Automatically connect eligible plugs and slots of snap "core"

2019-05-17T10:58:58+01:00 INFO Waiting for restart...

sudo systemctl status snapd.autoimport:

● snapd.autoimport.service - Auto import assertions from block devices
   Loaded: loaded (/lib/systemd/system/snapd.autoimport.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Fri 2019-05-17 16:31:20 BST; 33min ago
           └─ ConditionKernelCommandLine=snap_core was not met

Detalles de Windows: - Windows 10, versión 1809, (compilación del sistema operativo 17763.437)

Cosas que he probado

1 - jugando con/var/lib/snapd/state.json

Probé la sugerencia aquí:https://forum.snapcraft.io/t/cant-install-or-refresh-snaps-on-arch-linux/8690/28

Que se parece a esto:

sudo systemctl stop snapd
sudo cat /var/lib/snapd/state.json | \
    jq 'delpaths([["data", "auth", "device"]])' > state.json-new
sudo cp state.json-new /var/lib/snapd/state.json
sudo systemctl start snapd

Sin embargo (y probablemente soy yo un novato de Ubuntu) no puedo jqinstalarlo y no estoy seguro de qué está haciendo exactamente, así que no puedo hacerlo manualmente.

2 - Usando la imagen de Ubuntu 19

Aparentemente esto tiene el mismo problema.

3 - Un colega lo intentó en su computadora portátil

el tenia el mismo problema

4 - Reinstalarsnapd

Ejecuté esto: sudo apt install --reinstall snapdsólo para que la instalación se atascara en el 67%.

5 - jugando con/var/lib/snapd/seed/seed.yaml

Según este error:https://www.mail-archive.com/[correo electrónico protegido]/msg5400922.html

Intenté reordenar la parte gtk-common-themes y también eliminar la parte gnome-calculator (reiniciando después de cada cambio), pero esto no pareció hacer ninguna diferencia. El snap tasks --last=seedcomando todavía mostraba que se atascaba en la tarea de la calculadora de gnome.

6 - cabezazo en el teclado

Me sentí mejor pero el problema persistió.

7 - usando una imagen de inicio no rápido

Descargué una ISO de Ubuntu 18.04.2 y la usé. ESTO FUNCIONÓ (ya que pude instalar Visual Studio Code y los comandos instantáneos parecían saludables). Sin embargo, no tiene todas las cosas buenas de Hyper-V, por lo que la pantalla se resolvió, no fue necesario copiar y pegar, el mouse estaba muy lento, etc.

Podría instalar los distintos bits para hacer que esta imagen sea más compatible con Hyper-V, pero tengo la sensación de que nunca seré tan hábil como la oficial. Si puedo arreglar snapeste, creo que terminaré con la mejor UX.

8 - ESTO FUNCIONA. jugando con /var/lib/snapd/seed/seed.yamlla parte 2

Eliminé un montón de cosas de mi /var/lib/snapd/seed/seed.yamlasí que ahora se ve así:

snaps:
  -
    name: core
    channel: stable
    file: core_6673.snap
  -
    name: gtk-common-themes
    channel: stable/ubuntu-18.04
    file: gtk-common-themes_1198.snap
  -
    name: gnome-3-26-1604
    channel: stable/ubuntu-18.04
    file: gnome-3-26-1604_82.snap

Y luego lo hizo snap abort --last=seedseguido de sudo systemctl restart snapd. Verifique snap tasks --last=seed: todos deberían estar completos y puede instalar instantáneas (como Visual Studio Code).

Alguien más inteligente que yo probablemente señalará los horribles efectos secundarios que esto causará.

Respuesta1

Aparentemente, el archivo seed.yml especifica aplicaciones para instalar en una instalación nueva del sistema operativo.

Si eliminamos los que se están atascando y luego los instalamos manualmente, esto funciona.

Pasos:

  1. Cambie su /var/lib/snapd/seed/seed.yamlarchivo para que se vea así:

    snaps:
    -
    name: core
    channel: stable
    file: core_6673.snap
    -
    name: gtk-common-themes
    channel: stable/ubuntu-18.04
    file: gtk-common-themes_1198.snap
    -
    name: gnome-3-26-1604
    channel: stable/ubuntu-18.04
    file: gnome-3-26-1604_82.snap
    

    Básicamente, estoy eliminando todas las entradas que causaron que las tareas instantáneas se atascaran.

  2. Cancele las tareas instantáneas que se están ejecutando actualmente y reinicie el servicio:

    • snap abort --last=seed
    • sudo systemctl restart snapd
    • Continúe corriendo snap tasks --last=seedpara ver el progreso de las tareas instantáneas y espere a que todas las tareas estén "terminadas".
  3. Instale manualmente cualquier aplicación que haya eliminado /var/lib/snapd/seed/seed.yaml; pueden incluir:

    • gnome-calculator
    • gnome-characters
    • gnome-logs
    • gnome-system-monitor

    El comando para reinstalarlos es:

    snap install gnome-calculator gnome-characters gnome-logs gnome-system-monitor`
    

Crédito

Gracias aStefan Jarina¡Para obtener ayuda para resolver este problema!

información relacionada