您的系统无法访问快照存储

Zok*_*ker 22 apt windows-subsystem-for-linux 18.10

我尝试使用以下说明将我的 windows ubuntu 子系统升级到 18.10:https : //linuxconfig.org/how-to-upgrade-ubuntu-to-18-10-cosmic-cuttlefish#h9-how-to-upgrade-ubuntu- Debian 方式

但在升级中我收到此错误:

 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
Run Code Online (Sandbox Code Playgroud)

我的防火墙被禁用,我看不出有什么原因,为什么这不起作用。

我也试着跑snap info lxd但是

Interacting with snapd is not yet supported on Windows Subsystem for Linux.
This command has been left available for documentation purposes only.
Run Code Online (Sandbox Code Playgroud)

这是尝试运行更新时命令行中的完整消息:

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)
Run Code Online (Sandbox Code Playgroud)

任何想法,我该如何解决?子系统有互联网连接,所以我不确定,为什么它不能连接到快照存储

小智 28

这个microsoft WSL 问题完全适合我。本质上它归结为:

  1. 中止do-release-upgrade脚本
  2. 重新启动 Ubuntu
  3. 使用以下命令删除 lxd: sudo dpkg --force depends -P lxd; sudo dpkg --force depends -P lxd-client

  4. 完成 sudo apt upgrade


Dan*_* K. 7

我遇到了同样的问题,发现了这个问题。

到目前为止,唯一的答案是中止do-release-upgrade脚本。我不想要这个。

这是解决方案:

lxd出现错误消息时,您将获得三个选择,其中之一是skip

选择skip 后,出现以下消息:

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>
Run Code Online (Sandbox Code Playgroud)

所以第一,我打开了另一Ubuntu的shell窗口并输入:sudo /etc/init.d/lxd stop 反应是Stopping Container hypervisor based on LXC: (not running).

然后SECOND,我删除了消息中给出的目录:sudo rm -rf /var/lib/lxd

最后,我返回到第一个 Ubuntu shell 窗口并按下回车键。并skip再次选择。这次安装继续。