web-dev-qa-db-ja.com

システムがスナップストアに到達できません

次の手順を使用して、Windows ubuntuサブシステムを18.10にアップグレードしようとしました: https://linuxconfig.org/how-to-upgrade-ubuntu-to-18-10-cosmic-cuttlefish#h9-how-to- upgrade-ubuntu-the-debian-way

しかし、アップグレード中に私はこのエラーを受け取ります:

 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

ファイアウォールが無効になっているため、理由がわかりません。なぜこれが機能しないのでしょうか。

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.

次に、更新を実行しようとしたときのコマンドラインの完全なメッセージを示します。

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)

何かアイデアがあれば、どうすれば修正できますか?サブシステムにインターネット接続があるので、なぜそれがスナップストアに接続できないのかわかりません

10
Zoker

これは 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で終了

16
radke

私は同じ問題に直面し、この質問を見つけました。

これまでのところ、_do-release-upgrade_スクリプトを中止する必要がある唯一の回答です。これは必要ありません。

これが解決策です:

lxdからのエラーメッセージが表示された場合、3つの選択肢が表示されます。1つは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>
_

だから[〜#〜] first [〜#〜]、別のUbuntu Shellウィンドウを開いて次のように入力しました:_Sudo /etc/init.d/lxd stop_応答はStopping Container hypervisor based on LXC: (not running).でした

次に[〜#〜] second [〜#〜]、メッセージで指定されたディレクトリを削除しました:_Sudo rm -rf /var/lib/lxd_

[〜#〜] last [〜#〜]、最初のUbuntu Shellウィンドウに戻ってReturnキーを押しました。 skipagainを選択しました。今回はインストールが続行されました。

3
Daniel K.

JBCPの方法は私にとってはうまくいきました。小さな違い:do-release-upgradeを実行する前に、lxdを停止して/ var/lib/lxdを削除しました。これで、システムがその時点で「スキップ」することができました。余分なウィンドウやステップはありません。見つけられなかっただろうが、どうもありがとう。

0
HansW