Debian
無法將 Kali 升級到 Debian
嘗試將 kali 升級到 debian 並將破折號 0.5.8-2.5 升級到 0.5.8-2.6 時出錯。結果 sh 沒有找到。通過以下方式恢復系統:
rm /bin/sh ln -s /usr/bin/dash /bin/sh
Cuz /bin/sh 在我嘗試重新安裝破折號時得到錯誤的符號連結嘗試重新安裝破折號並得到相同的錯誤:
apt install dash --reinstall Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 273 not upgraded. 1 not fully installed or removed. Need to get 0 B/113 kB of archives. After this operation, 0 B of additional disk space will be used. Preconfiguring packages ... (Reading database ... 426445 files and directories currently installed.) Preparing to unpack .../dash_0.5.8-2.6_amd64.deb ... Unpacking dash (0.5.8-2.6) over (0.5.8-2.6) ... Setting up dash (0.5.8-2.6) ... Removing 'diversion of /bin/sh to /bin/sh.distrib by bash' Adding 'diversion of /bin/sh to /bin/sh.distrib by dash' Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash' Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash' dpkg: error: error executing hook 'if { test "$DPKG_HOOK_ACTION" = add-architecture || test "$DPKG_HOOK_ACTION" = remove-architecture; } && test -x /usr/share/pkg-config-dpkghook; then /usr/share/pkg-config-dpkghook update; fi', exit code 32512 E: Sub-process /usr/bin/dpkg returned an error code (2) E: Problem executing scripts DPkg::Post-Invoke '/usr/bin/test -e /usr/share/dbus-1/system-services/org.freedesktop.PackageKit.service && /usr/bin/test -S /var/run/dbus/system_bus_socket && /usr/bin/gdbus call --system --dest org.freedesktop.PackageKit --object-path /org/freedesktop/PackageKit --timeout 4 --method org.freedesktop.PackageKit.StateHasChanged cache-update > /dev/null; /bin/echo > /dev/null' E: Sub-process returned an error code
lsb_release -a
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.0 (stretch) Release: 9.0 Codename: stretch
沒有支持從 Kali 到 Debian 的升級路徑。如果您想使用 Debian 而不是 Kali,您需要使用 Debian 安裝程序(下載安裝程序映像)在您的 Kali 設置上安裝 Debian。您必須事先備份要保留的所有數據。
在這種特殊情況下,您會遇到 ;中的錯誤
dash
。這也表明您正在嘗試安裝不穩定的 Debian,如果您對系統不是很熟悉,則不建議這樣做。您應該安裝 Debian stable 代替。