Kali-Linux
在 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-installed
為uninstalled
。嘗試直接安裝包會導致如下錯誤:
$ 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)
注意:這可能與這個問題相同:Cannot install Kali-WIn-Kex because of Dpkg error但審閱者認為這應該是一個新問題。
該包
kali-win-kex
通過檢查是否/mnt/wsl
存在來測試 WSL2,但似乎 WSL 沒有創建該目錄。要安裝此軟體包:
$ sudo mkdir -p /mnt/wsl $ sudo apt install -y kali-win-kex