在Windows 10 Spring Creators Update(RS4)上运行的Ubuntu 18.04中执行apt-get dist-upgrade时,出现以下错误:

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 1dpkg: 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 1update-rc.d: warning: start and stop actions are no longer supported; falling back to defaultsinvoke-rc.d: could not determine current runlevelErrors were encountered while processing: /var/cache/apt/archives/ebtables_2.0.10.4-3.5ubuntu2.18.04.1_amd64.debE: Sub-process /usr/bin/dpkg returned an error code (1)

我不太在乎ebtables(它似乎是默认的/内置的软件包),但是我不想筛选每个更新的输出以找出是否有除此以外的新错误。

最佳答案

事实证明,WSL不支持init / runlevel(这很有意义,因为它实际上没有正常的Linux引导过程),如下所示:
https://github.com/Microsoft/WSL/issues/1761#issuecomment-393154803

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

如果您以前曾遇到过此问题,则现在应该可以解决。

10-07 15:58