Snaps won't install in Ubuntu 18.04
I got the same question, and I tried the jq thing above but it did not work for me. Then I found that just purge/reinstall snapd package can fix this issue in my testing.
$ sudo apt purge snapd
$ sudo apt install snapd
If you're running Ubuntu in Hyper-V on Windows, this solution helped me understand what the real problem is and how to fix it without too much brain surgery on the OS.
Apparently the seed.yml file specifies apps to install on a fresh OS install.
If we remove the ones that are getting stuck and then manually install them, this works.
Steps:
Change your
/var/lib/snapd/seed/seed.yaml
file to look like this: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 ```
Basically I'm removing all the entries that caused the snap tasks to get stuck.
Abort the currently running snap tasks and restart the service:
snap abort --last=seed
sudo systemctl restart snapd
- Keep running
snap tasks --last=seed
to see the progress of the snap tasks and wait for all the tasks to be "Done"Manually install any apps that you removed from
/var/lib/snapd/seed/seed.yaml
, they might include:
gnome-calculator
gnome-characters
gnome-logs
gnome-system-monitor
The command to reinstall these is:
snap install gnome-calculator gnome-characters gnome-logs gnome-system-monitor
I have exactly the same issue now on fresh installation of Ubuntu 19.04.
Same error, mentioned fixes didn't help at all.
snap 2.38+19.04
snapd 2.38+19.04
series 16
ubuntu 19.04
kernel 5.0.0-13-generic
reinstalling snapd is stuck for me for almost an hour and apparently it won't move unless this service will switch state:
snapd.seeded.service - Wait until snapd is fully seeded
This is a completely new installation of ubuntu :-D basically just clean install + updates so it is simply comical that their main store is not working... Will give it 1 more hour and then try to reinstall whole system again.
PS:
Flatpak works, just saying
PS2: Just tried fresh installation of 18.04 and here we go again:
snapd.seeded.service - Wait until snapd is fully seeded
Loaded: loaded (/lib/systemd/system/snapd.seeded.service; enabled; vendor preset: enabled)
Active: activating (start) since Sun 2019-05-12 10:07:11 CEST; 3min 10s ago
Main PID: 48141 (snap)
Tasks: 9 (limit: 4617)
CGroup: /system.slice/snapd.seeded.service
└─48141 /usr/bin/snap wait system seed.loaded
kvě 12 10:07:11 stefan-ubuntu systemd[1]: Starting Wait until snapd is fully seeded...
It is only 3 minutes but now that I think about it, I suspect either some problem with their API, or simply broken version of snapd because as you can see, the version is same on both installations:
snap 2.38+18.04
snapd 2.38+18.04
series 16
ubuntu 18.04
kernel 4.15.0-47-generic
DO NOT UPDATE YOUR SNAPD :-)
I tried all of the answers here, but none of them completely worked.
The top answer about changing /var/lib/snapd/seed/seed.yaml got stuck after command snap install gnome-calculator gnome-characters gnome-logs gnome-system-monitor
on getting dependencies.
What fixed it,
- completely deleting the seed.yaml file
- and then running
snap install gnome-calculator gnome-characters gnome-logs gnome-system-monitor
which forced snapd to re-download and re-install, and installing all the gnome software mentioned above. And the error was gone. Thanks to all the people who helped here.