
Ich habe mithilfe der Funktion „Schnelles Erstellen“ in Hyper-V unter Windows 10 eine neue VM erstellt.
Nachdem die VM eingerichtet war (ich habe Spracheinstellungen ausgewählt, ein Passwort erstellt usw.), habe ich versucht, Visual Studio Code zu installieren und habe die folgende Fehlermeldung erhalten:
Unable to install "Visual Studio Code": too early for operation, device not yet seeded or device model not acknowledged
.
Den Untersuchungen zufolge handelt es sich hier offenbar um ein Snap-Problem.
Hier sind einige Details
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
Windows-Details: – Windows 10, Version 1809, (OS Build 17763.437)
Dinge, die ich versucht habe
1 - Herumspielen mit/var/lib/snapd/state.json
Ich habe den Vorschlag hier ausprobiert:https://forum.snapcraft.io/t/cant-install-or-refresh-snaps-on-arch-linux/8690/28
Und das sieht so aus:
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
Allerdings (und das liegt wahrscheinlich daran, dass ich ein Ubuntu-Neuling bin) kann ich die Installation nicht jq
durchführen und bin mir nicht sicher, was genau sie bewirkt. Daher kann ich sie nicht manuell ausführen.
2 - Verwenden des Ubuntu 19-Image
Hier liegt offenbar das gleiche Problem vor.
3 - Ein Kollege versuchte es auf seinem Laptop
Er hatte das gleiche Problem
4 - Neuinstallationsnapd
Ich habe dies ausgeführt, sudo apt install --reinstall snapd
aber die Installation blieb bei 67 % hängen.
5 - Herumspielen mit/var/lib/snapd/seed/seed.yaml
Gemäß diesem Fehler:https://www.mail-archive.com/[email geschützt]/msg5400922.html
Ich habe versucht, den Teil „gtk-common-themes“ neu anzuordnen und auch den Teil „gnome-calculator“ zu entfernen (Neustart nach jeder Änderung), aber das schien keinen Unterschied zu machen. Der snap tasks --last=seed
Befehl zeigte immer noch, dass er bei der Aufgabe „gnome-calculator“ hängen blieb.
6 - Kopfstoß gegen die Tastatur
Ich fühlte mich besser, aber das Problem bestand weiterhin.
7 - Verwenden eines Nicht-Schnellstartabbilds
Ich habe eine Ubuntu 18.04.2 ISO heruntergeladen und verwendet. DAS HAT FUNKTIONIERT (ich konnte Visual Studio Code installieren und die Snap-Befehle sahen einwandfrei aus). Allerdings hat es nicht all das tolle Hyper-V-Zeug, daher war die Bildschirmauflösung beschissen, es gab kein Kopieren und Einfügen, die Maus war sehr langsam usw. ...
Ich könnte die verschiedenen Teile installieren, um dieses Image Hyper-V-freundlicher zu machen, aber ich habe das Gefühl, dass ich damit nie so gut klarkomme wie mit dem offiziellen. Wenn ich das snap
hier beheben kann, habe ich wahrscheinlich die beste UX.
8 - DAS FUNKTIONIERT. Herumspielen mit /var/lib/snapd/seed/seed.yaml
Teil 2
Ich habe eine Menge Zeug von meinem entfernt, /var/lib/snapd/seed/seed.yaml
sodass es jetzt so aussieht:
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
Und dann folgte snap abort --last=seed
. sudo systemctl restart snapd
Überprüfen Sie snap tasks --last=seed
– sie sollten alle vollständig sein und Sie können Snaps installieren (z. B. Visual Studio Code).
Jemand, der schlauer ist als ich, wird wahrscheinlich auf die schrecklichen Nebenwirkungen hinweisen, die dies haben wird.
Antwort1
Anscheinend gibt die Datei seed.yml die Apps an, die bei einer Neuinstallation des Betriebssystems installiert werden sollen.
Wenn wir diejenigen entfernen, die hängen bleiben, und sie dann manuell installieren, funktioniert dies.
Schritte:
Ändern Sie Ihre
/var/lib/snapd/seed/seed.yaml
Datei so, dass sie wie folgt aussieht: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
Grundsätzlich entferne ich alle Einträge, die dazu geführt haben, dass die Snap-Aufgaben hängen geblieben sind.
Brechen Sie die aktuell laufenden Snap-Tasks ab und starten Sie den Dienst neu:
snap abort --last=seed
sudo systemctl restart snapd
- Führen Sie den Vorgang weiter aus
snap tasks --last=seed
, um den Fortschritt der Snap-Aufgaben zu verfolgen, und warten Sie, bis alle Aufgaben „erledigt“ sind.
Installieren Sie alle Apps, die Sie aus entfernt haben
/var/lib/snapd/seed/seed.yaml
, manuell. Dazu können gehören:gnome-calculator
gnome-characters
gnome-logs
gnome-system-monitor
Der Befehl zur Neuinstallation lautet:
snap install gnome-calculator gnome-characters gnome-logs gnome-system-monitor`
Kredit
Dank anStefan Jarinafür Hilfe bei der Lösung dieses Problems!