在 WSL2 上安装 `kali-win-kex` 失败

在 WSL2 上安装 `kali-win-kex` 失败

我尝试按照以下方式安装 Kali-Win-Kex官方指南

    $ sudo apt install kali-win-kex -y
    dpkg: error processing archive /var/cache/apt/archives/kali-win-kex_2.7_amd64.deb (--unpack):
     new kali-win-kex package pre-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
     /var/cache/apt/archives/kali-win-kex_2.7_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

尝试apt install -f解决问题会将包状态从 更改half-installeduninstalled

尝试直接安装该包会出现以下错误:

$ sudo dpkg -i /var/cache/apt/archives/kali-win-kex_2.7_amd64.deb
(Reading database ... 102450 files and directories currently installed.)
Preparing to unpack .../kali-win-kex_2.7_amd64.deb ...
This package is for WSL 2. Nothing to be done here.
dpkg: error processing archive /var/cache/apt/archives/kali-win-kex_2.7_amd64.deb (--install):
 new kali-win-kex package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/kali-win-kex_2.7_amd64.deb

我该如何安装kali-win-kex

Windows version: 19042.746
Kali version: 2020.4 (kali-rolling)

答案1

您当前未运行 WSL 2。如果您将 WSL 升级到 WSL 2,它将可以工作。

相关内容