Score:0

Snaps not working after upgrade from 18.04 to 20.04

us flag

I honestly don't remember if snap installs worked before with 18.04, I just noticed he problem after the upgrade to 20.04.

I have tried all the suggestions I have read here and elsewhere and still get the error...

error: cannot install "hello-world": Post https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup api.snapcraft.io: no such host

Update: Here are relevant logs after attempting snap install. Does anything jump out?

3/16/23 7:00 PM systemd Starting Snap Daemon...
3/16/23 7:00 PM snapd   overlord.go:268: Acquiring state lock file
3/16/23 7:00 PM snapd   overlord.go:273: Acquired state lock file
3/16/23 7:00 PM snapd   daemon.go:247: started snapd/2.58+20.04 (series 16; classic) ubuntu/20.04 (amd64) linux/5.4.0-144-generic.
3/16/23 7:00 PM systemd tmp-syscheck\x2dmountpoint\x2d215737467.mount: Succeeded.
3/16/23 7:00 PM systemd tmp-syscheck\x2dmountpoint\x2d215737467.mount: Succeeded.
3/16/23 7:00 PM snapd   daemon.go:340: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)
3/16/23 7:00 PM snapd   backends.go:58: AppArmor status: apparmor is enabled and all features are available
3/16/23 7:00 PM systemd Started Snap Daemon.
3/16/23 7:00 PM dbus-daemon [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service' requested by ':1.180' (uid=0 pid=5965 comm="/usr/lib/snapd/snapd " label="unconfined")
3/16/23 7:00 PM systemd Starting Time & Date Service...
3/16/23 7:00 PM dbus-daemon [system] Successfully activated service 'org.freedesktop.timedate1'
3/16/23 7:00 PM systemd Started Time & Date Service.
3/16/23 7:00 PM snapd   api_snaps.go:366: Installing snap "hello-world" revision unset
3/16/23 7:00 PM snapd   store_download.go:142: no host system xdelta3 available to use deltas
3/16/23 7:00 PM /usr/lib/gdm3/gdm-x-session qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 61909, resource id: 39846192, major code: 3 (GetWindowAttributes), minor code: 0
3/16/23 7:00 PM sudo    pam_unix(sudo:session): session closed for user root
3/16/23 7:00 PM /usr/lib/gdm3/gdm-x-session qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 62084, resource id: 39846194, major code: 3 (GetWindowAttributes), minor code: 0
3/16/23 7:00 PM snapd   daemon.go:521: gracefully waiting for running hooks
3/16/23 7:00 PM snapd   daemon.go:523: done waiting for running hooks
3/16/23 7:00 PM snapd   overlord.go:512: Released state lock file
3/16/23 7:00 PM snapd   daemon stop requested to wait for socket activation
3/16/23 7:00 PM systemd snapd.service: Succeeded.
3/16/23 7:00 PM systemd systemd-timedated.service: Succeeded.
user535733 avatar
cn flag
"*lookup api.snapcraft.io: no such host*" suggests that you have a networking issue that prevents proper operation of snapd. The snapd process should be downloading and installing for you. Check for logs around failure times for other networking clues.
Score:0
us flag

This fixed it. It was a DNS issue.

sudo systemd-resolve --set-dns=8.8.8.8 --interface=<interface name>

Taken from this thread...

DNS issues after upgrading to 20.04

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.