如何解决 Windows 10 Spring Creators Update 上 Ubuntu 中的运行级别错误?

Mat*_*ett 5 ubuntu ebtables windows-subsystem-for-linux

apt-get dist-upgrade在 Windows 10 Spring Creators Update (RS4) 上运行 Ubuntu 18.04 时,我收到此错误:

Preparing to unpack .../ebtables_2.0.10.4-3.5ubuntu2.18.04.1_amd64.deb ...
invoke-rc.d: could not determine current runlevel
 * Error: insufficient privileges to access the ebtables rulesets.
invoke-rc.d: initscript ebtables, action "stop" failed.
dpkg: warning: old ebtables package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
invoke-rc.d: could not determine current runlevel
 * Error: insufficient privileges to access the ebtables rulesets.
invoke-rc.d: initscript ebtables, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/ebtables_2.0.10.4-3.5ubuntu2.18.04.1_amd64.deb (--unpack):
 new ebtables package pre-removal script subprocess returned error exit status 1
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
invoke-rc.d: could not determine current runlevel
Errors were encountered while processing:
 /var/cache/apt/archives/ebtables_2.0.10.4-3.5ubuntu2.18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)

我并不真正关心 ebtables (它似乎是一个默认/内置包),但我不想筛选每个更新的输出以找出除此之外是否还有新错误。

Mat*_*ett 5

事实证明,WSL 不\xe2\x80\x99t 支持 init/runlevels(这是有道理的,因为它实际上没有正常的 Linux 启动过程),如下所述:\n https://github.com/Microsoft /WSL/issues/1761#issuecomment-393154803

\n\n

好消息是 Ubuntu Cosmic 中进行了修复,该修复已过滤到 Bionic (18.04) 和 Xenial (16.04):\n https://github.com/Microsoft/WSL/issues/1761#issuecomment-393652849

\n\n

如果您以前遇到过此问题,那么现在应该已得到解决。

\n

  • 在 Windows 10 上的 Ubuntu 20.04 的 WSL 中仍然看到相同的问题 - 您有机会知道这个问题是否已得到解决吗? (2认同)