4

I tried to upgrade my windows ubuntu subystem to 18.10 using this instruction: https://linuxconfig.org/how-to-upgrade-ubuntu-to-18-10-cosmic-cuttlefish#h9-how-to-upgrade-ubuntu-the-debian-way

But within the upgrade I get this error:

 Your system is unable to reach the snap store, please make sure you're connected to the Internet and update any   │
 │ firewall or proxy settings as needed so that you can reach the snap store.                                        │
 │                                                                                                                   │
 │ You can manually check for connectivity by running "snap info lxd"                                                │
 │                                                                                                                   │
 │ Aborting will cause the upgrade to fail and will require it to be re-attempted once snapd is functional on the    │
 │ system.                                                                                                           │
 │                                                                                                                   │
 │ Unable to reach the snap store

My firewall is disabled to I see no reason, why this would not work.

I also tried to run snap info lxd but

Interacting with snapd is not yet supported on Windows Subsystem for Linux.
This command has been left available for documentation purposes only.

Here is the complete message in the command line, when trying to run the update:

The following additional packages will be installed:
  lxd
The following packages will be upgraded:
  lxd
1 upgraded, 0 newly installed, 0 to remove and 227 not upgraded.
180 not fully installed or removed.
Need to get 0 B/11.1 kB of archives.
After this operation, 20.5 MB disk space will be freed.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 61051 files and directories currently installed.)
Preparing to unpack .../archives/lxd_1%3a0.4_all.deb ...
invoke-rc.d: could not determine current runlevel
Stopping Container hypervisor based on LXC: (not running).
=> Installing the LXD snap
==> Checking connectivity with the snap store
===> Unable to contact the store
===> Aborting at user request
dpkg: error processing archive /var/cache/apt/archives/lxd_1%3a0.4_all.deb (--unpack):
 new lxd package pre-installation script subprocess returned error exit status 1
invoke-rc.d: could not determine current runlevel
Errors were encountered while processing:
 /var/cache/apt/archives/lxd_1%3a0.4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any idea, how I can fix that? The subsystem has internet connection, so I'm not sure, why it can't connect to the snap store

  • 2
    You cannot run LXD in WSL. It does not support the underlying requirements to make LXD work. Even if it did, it sounds like Snaps are also not working in WSL. You aren't on a restricted subnet or network are you? – Thomas Ward Feb 18 at 18:31
  • Actually I don't want to run LXD (I never heard of it before the upgrade), but the system tries to install it anyway: The following packages have unmet dependencies: lxd-client : Depends: lxd (>= 1:0.4) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). – Zoker Feb 18 at 18:39
  • 1
    So do sudo apt-get remove lxd lxd-client. And note that the system not being able ot reach Snapcraft means that underlying in WSL there may be odd issues because it's not really a true Ubuntu, it's Ubuntu running on WIndows syscalls which can cause headaches. – Thomas Ward Feb 18 at 18:41
  • 2
    I actually needed to do sudo apt remove lxd lxd-client. I'm still wondering why it was installed in the first place – Zoker Feb 18 at 18:46
4

This microsoft WSL issue completely made it work for me. Essentially it boiled down to:

  1. Abort the do-release-upgrade script
  2. Re-launch Ubuntu
  3. Remove lxd with: sudo dpkg --force depends -P lxd; sudo dpkg --force depends -P lxd-client

  4. Finish with sudo apt upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.