Your system is unable to reach the snap store
Solution 1
This microsoft WSL issue completely made it work for me. Essentially it boiled down to:
- Abort the
do-release-upgrade
script - Re-launch Ubuntu
Remove lxd with:
sudo dpkg --force depends -P lxd; sudo dpkg --force depends -P lxd-client
Finish with
sudo apt upgrade
Solution 2
I was faced with the same problem and found this question.
So far, the only answer requires to abort the do-release-upgrade
script. I do not want this.
Here is the solution:
When the error message from lxd
appeared, you are given three choices, one of them is skip.
After choosing skip, the following message appeared:
Skipping is not allowed when LXD has been initialized
LXD appears to have been configured on this system.
Please stop LXD and remove local data in /var/lib/lxd/ if
you would like to skip installing the LXD snap and migrating the local data.
<Ok>
So FIRST, I opened another Ubuntu shell window and entered: sudo /etc/init.d/lxd stop
The response was Stopping Container hypervisor based on LXC: (not running).
Then SECOND, I deleted the directory given in the message: sudo rm -rf /var/lib/lxd
LAST, I returned to the first Ubuntu shell window and pressed return. And chose skip
again. This time the installation continued.
Related videos on Youtube
![Zoker](https://i.stack.imgur.com/R5NJf.png?s=256&g=1)
Zoker
Updated on September 18, 2022Comments
-
Zoker almost 2 years
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
butInteracting 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
-
Thomas Ward over 5 yearsYou 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?
-
Zoker over 5 yearsActually 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).
-
Thomas Ward over 5 yearsSo 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. -
Zoker over 5 yearsI actually needed to do
sudo apt remove lxd lxd-client
. I'm still wondering why it was installed in the first place
-
-
David Bendahan about 4 yearsStep 3 saved my day! Thanks Man! :)
-
Admin about 2 yearsHow do you abort the do-release-upgrade script?