Core depends on base system's 'resolvconf' package

Recently I installed PlexMediaServer snap, and it wasn’t working because of failing DNS. After some digging and I noticed that in its chroot /etc/resolv.conf is linked to /run/resolvconf/resolv.conf, which didn’t exist in my box.

This was fixed with:

$ sudo apt install resolvconf

But it seems that since “Core” depends on resolvconf, there should be a dependency in “snapd” deb to “resolvconf” ?

My ubuntu installation is 19.04, but it has been upgraded for many years – as opposed to installed from scratch. So maybe that’s why resolvconf deb package wasn’t installed by default ?


The /etc and /run inside the snap sandbox should be the same directories as you see outside of the sandbox. So if it is a broken symlink inside the snap sandbox, I’d expect non snap applications to be broken too.

The resolvconf package isn’t part of the default Ubuntu 19.04 install, so it certainly isn’t a requirement to run snap packages.

If you only noticed the breakage recently, is it possible that you uninstalled a deb package that required and then ran apt autoremove? That should have cleaned things up (probably by pointing the symlink to /etc/systemd/resolve/stub-resolv.conf), but presumably that didn’t happen for some reason.

Thanks for the feedback, but:

Exactly, that’s what I figured out: the /etc and /run inside the sandbox are linked to the outside.

But the /run/resolvconf/resolv.conf outside the sandbox did not exist. It seems (??) it is created by the resolvconf package, which is not installed by default.

If not resolvconf, who creates this file outside the sandbox ? (in the ubuntu system) It didn’t exist in my box …

Notice, I just picked up on the breakage now, because PlexMediaServer is the first snap I use (that I know of) that depends on DNS. So it’s not that it broke now … likely it has been broken always, but I haven’t noticed.


thanks again :slight_smile:

i think there was a bug in update-manager prior to the 18.04 release that didnt properly do the transition from resolvconf to systemd-resolved … so if you ran a pre-release or upgraded to it during that timeframe you might have the stale symlink left on your system … are you sure it wasnt there before you looked at the snap ? :slight_smile:

Yes, as I was trying to figure out Snap/PlexMediaServer chroot setup, I found the link from sandbox to /run/resolvconf/resolv.conf. The target file didn’t exist (but /etc/resolv.conf does exist).

Searching around I saw someone mentioned it is created by sudo apt install resolvconf. I did that, it got created, and things started working.

All the rest is just me guesswork-ing …

The last time I installed my box from scratch was way before 18.04 … so the issue you raised may be related ?

well, the issue only happened if you upgraded to the development release of 18.04 … i.e. before it was released …

this is how it should be:

16.04 and before:

$ snap run --shell htop # this spawns a shell inside the snap confinement...
$ ls /run/resolvconf/resolv.conf
$ ls /run/systemd/resolve/stub-resolv.conf
ls: cannot access '/run/systemd/resolve/stub-resolv.conf': No such file or directory

18.04 and onwards:

$ snap run --shell htop
$ ls /run/resolvconf/resolv.conf
ls: cannot access '/run/resolvconf/resolv.conf': No such file or directory
$ ls /run/systemd/resolve/stub-resolv.conf

Thanks for sorting it out :slight_smile: it may be the case that at some point I upgraded to a development version because of some needed package / driver (I don’t recall, but it’s likely).