# Snaps won't install in Ubuntu 18.04

I have a fresh installation of Ubuntu 18.04 and when I try to install any snaps from Ubuntu Software I invariably get the message too early for operation, device not yet seeded or device model not acknowledged. I'm fairly new with Ubuntu, but I know how to google and follow instructions. I can't find a solution to this problem. Has anyone seen this?

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:

# 1. 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.

# 2. 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"

# 3. 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

• Can someone explain why they downvoted this? – Tubs Jun 13 at 15:43
• Not sure why it is downvoted, at first I thought, that it is because this is solution from another answer and I couldn't see the link, but the link is there. However this is correct answer and the only one that is working at the moment, so going to upvote this answer. – Stefan Jarina Jun 15 at 7:30
• It took me quite a while to find the right solution for Ubuntu Hyper V 19.04, because error message redirect to this type of messages above. Upvoting too. – Boud Jun 23 at 2:36

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
Active: activating (start) since Sun 2019-05-12 10:07:11 CEST; 3min 10s ago
Main PID: 48141 (snap)
CGroup: /system.slice/snapd.seeded.service

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,

1. completely deleting the seed.yaml file
2. 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.

Try the approach described here. This essentially refreshes a configuration file.

Open the terminal and issue following commands one by one (tip: triple-click a line to select it, then copy it and paste it in the terminal). On Ubuntu, you will need to install the jq command, so I added one command to do that. In addition, I added a command to backup the original file so you can restore the previous situation in case it did not solve the issue.

sudo apt install jq
sudo cp /var/lib/snapd/state.json /var/lib/snapd/state.json-old
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


To be sure, reboot the system and try it the problem is solved. If not, you can revert to the previous state by copying the old file back, deleting the backup and new file, and optionally deleting the command again:

sudo cp state.json-old /var/lib/snapd/state.json
sudo rm state.json-*
sudo apt remove jq ;  sudo apt autoremove
`

If you are using Ubuntu 16.04 LTS (Xenial Xerus) or later, including the latest Ubuntu 18.04 LTS (Bionic Beaver), you have nothing to do. Snap is already installed and ready to work. Therefore, if you are using a version below or if your add-on is not installed, you must install it to start using it.

You can install it with the following command: $sudo apt update$ sudo apt install snapd