Kali-Linux
Kali Linux - 升級系統時出現 dpkg 錯誤。處理包 powershell-empire (–configure) 時出錯:
當我遇到錯誤時,我 正在使用標準
sudo apt update
和更高版本的命令升級我的 Kali Linux VPS :.sudo apt upgrade``Sub-process /usr/bin/dpkg returned an error code (1)
我是很新的 Kali 使用者,所以我不知道為什麼會發生這個錯誤?除了標準的 Kali 安裝,我還安裝了 XFCE 桌面環境和 POSTGRE SQL 數據庫。沒有其他的。但是現在有一段時間我正在使用 SSH 連接到伺服器。
我更驚訝,因為我知道 Kali 使用 APT 包管理器,所以我不明白為什麼會有 DPKG 錯誤。
(michal㉿kali)-[~] └─$ sudo apt upgrade -y Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: baobab caribou cryptsetup-run folks-common gir1.2-caribou-1.0 gir1.2-clutter-1.0 gir1.2-cogl-1.0 gir1.2-coglpango-1.0 gir1.2-handy-0.0 gir1.2-mutter-8 gnom gnome-contacts gnome-core gnome-font-viewer gnome-logs gnome-online-miners gnome-tweak-tool golang-1.16-go golang-1.16-src gstreamer1.0-packagekit kwin-sty libamtk-5-0 libamtk-5-common libaom0 libavif12 libavif9 libcamel-1.2-62 libcaribou-common libcaribou0 libcbor0 libcodec2-0.9 libdap27 libdapclient6v5 libda libedataserver-1.2-25 libedataserverui-1.2-2 libepsilon1 libextutils-pkgconfig-perl libfluidsynth2 libfolks-eds26 libfolks26 libgdal28 libgdal29 libgdk-pix libgdk-pixbuf2.0-0 libgeos-3.9.0 libgeos-3.9.1 libgfbgraph-0.2-0 libgupnp-1.2-0 libhandy-0.0-0 libidn11 libkdecorations2private7 libkwineffects12a libkwing libkwinxrenderutils12 libmusicbrainz5-2 libmusicbrainz5cc2v5 libmutter-8-0 libnetcdf18 libntfs-3g883 libomp-11-dev libomp5-11 libplacebo72 libproj19 libquv libquvi-scripts-0.9 libstrictures-perl libtepl-5-0 libtracker-control-2.0-0 libtracker-miner-2.0-0 libtracker-sparql-2.0-0 liburcu6 liburing1 libvncclient1 libwireshark14 libwiretap11 libwsutil12 libx265-192 libxmlb1 libyara4 libzapojit-0.0-0 linux-image-5.10.0-kali7-amd64 lua-bitop lua-expat lua-json lua-sock odbcinst1debian2 python3-editor python3-exif python3-gevent python3-gevent-websocket python3-ipython-genutils python3-jupyter-core python3-m2crypto python3 python3-orjson python3-parameterized python3-pbr python3-plotly python3-pylnk python3-stem python3-tenacity python3-zope.event vlc-bin vlc-l10n vlc-plugin- vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba vlc-plugin-skins2 vlc-plugin-video-splitter vlc-plugin-visualization Use 'sudo apt autoremove' to remove them. The following packages have been kept back: breeze breeze-cursor-theme kde-cli-tools kde-cli-tools-data kde-config-gtk-style kde-config-screenlocker kde-plasma-desktop kde-style-breeze khotkeys khotk kwin-common kwin-data kwin-style-breeze kwin-x11 libcolorcorrect5 libkdecorations2-5v5 libkdecorations2private9 libkf5sysguard-bin libkf5sysguard-data libk libkfontinstui5 libkscreenlocker5 libksgrd9 libksignalplotter9 libksysguardformatter1 libksysguardsensorfaces1 libksysguardsensors1 libkwaylandserver5 libkwin4-effect-builtins1 libkwineffects13 libkwinglutils13 libkwinxrenderutils13 libkworkspace5-5 libnotificationmanager1 libplasma-geolocation-interface5 libpowerdevilcore2 libpowerdevilui5 libprocesscore9 libprocessui9 libsemanage-common libtaskmanager6abi1 libweather-ion7 passwd plasma-desktop plasma-deskt plasma-workspace plasma-workspace-data powerdevil powerdevil-data qml-module-org-kde-ksysguard systemsettings The following packages will be upgraded: libdecor-0-0 libdecor-0-plugin-1-cairo libnet-pcap-perl 3 upgraded, 0 newly installed, 0 to remove and 51 not upgraded. 4 not fully installed or removed. Need to get 92.4 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://mirror.serverius.net/kali kali-rolling/main amd64 libdecor-0-plugin-1-cairo amd64 0.1.0-3 [19.0 kB] Get:2 http://mirror.neostrada.nl/kali kali-rolling/main amd64 libdecor-0-0 amd64 0.1.0-3 [13.2 kB] Get:3 http://mirror.neostrada.nl/kali kali-rolling/main amd64 libnet-pcap-perl amd64 0.20-1 [60.2 kB] Fetched 92.4 kB in 1s (130 kB/s) (Reading database ... 468468 files and directories currently installed.) Preparing to unpack .../libdecor-0-plugin-1-cairo_0.1.0-3_amd64.deb ... Unpacking libdecor-0-plugin-1-cairo:amd64 (0.1.0-3) over (0.1.0-2) ... Preparing to unpack .../libdecor-0-0_0.1.0-3_amd64.deb ... Unpacking libdecor-0-0:amd64 (0.1.0-3) over (0.1.0-2) ... Preparing to unpack .../libnet-pcap-perl_0.20-1_amd64.deb ... Unpacking libnet-pcap-perl (0.20-1) over (0.19-1) ... Setting up powershell-empire (4.2.0-0kali2) ... Traceback (most recent call last): File "/usr/share/powershell-empire/empire.py", line 11, in <module> import empire.server.server as server File "/usr/share/powershell-empire/empire/server/server.py", line 24, in <module> import socketio File "/usr/lib/python3/dist-packages/socketio/__init__.py", line 3, in <module> from .client import Client File "/usr/lib/python3/dist-packages/socketio/client.py", line 7, in <module> import engineio File "/usr/lib/python3/dist-packages/engineio/__init__.py", line 8, in <module> from .asyncio_client import AsyncClient File "/usr/lib/python3/dist-packages/engineio/asyncio_client.py", line 7, in <module> import aiohttp File "/usr/lib/python3/dist-packages/aiohttp/__init__.py", line 6, in <module> from .client import ( File "/usr/lib/python3/dist-packages/aiohttp/client.py", line 35, in <module> from . import hdrs, http, payload File "/usr/lib/python3/dist-packages/aiohttp/http.py", line 7, in <module> from .http_parser import ( File "/usr/lib/python3/dist-packages/aiohttp/http_parser.py", line 15, in <module> from .helpers import NO_EXTENSIONS, BaseTimerContext File "/usr/lib/python3/dist-packages/aiohttp/helpers.py", line 667, in <module> class CeilTimeout(async_timeout.timeout): TypeError: function() argument 'code' must be code, not str dpkg: error processing package powershell-empire (--configure): installed powershell-empire package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of kali-linux-headless: kali-linux-headless depends on powershell-empire; however: Package powershell-empire is not configured yet. dpkg: error processing package kali-linux-headless (--configure): dependency problems - leaving unconfigured Setting up libdecor-0-0:amd64 (0.1.0-3) ... Setting up libnet-pcap-perl (0.20-1) ... dpkg: dependency problems prevent configuration of kali-linux-default: kali-linux-default depends on kali-linux-headless; however: Package kali-linux-headless is not configured yet. dpkg: error processing package kali-linux-default (--configure): dependency problems - leaving unconfigured Setting up libdecor-0-plugin-1-cairo:amd64 (0.1.0-3) ... dpkg: dependency problems prevent configuration of kali-linux-large: kali-linux-large depends on kali-linux-default; however: Package kali-linux-default is not configured yet. dpkg: error processing package kali-linux-large (--configure): dependency problems - leaving unconfigured Processing triggers for libc-bin (2.32-4) ... Processing triggers for man-db (2.9.4-2) ... Processing triggers for kali-menu (2021.4.2) ... Errors were encountered while processing: powershell-empire kali-linux-headless kali-linux-default kali-linux-large E: Sub-process /usr/bin/dpkg returned an error code (1) ┌──(michal㉿kali)-[~] └─$ ./setup/install.sh 100 ⨯ zsh: no such file or directory: ./setup/install.sh
(michal㉿kali)-[~] └─$ sudo dpkg --configure -a 130 ⨯ Setting up powershell-empire (4.2.0-0kali2) ... Traceback (most recent call last): File "/usr/share/powershell-empire/empire.py", line 11, in <module> import empire.server.server as server File "/usr/share/powershell-empire/empire/server/server.py", line 24, in <module> import socketio File "/usr/lib/python3/dist-packages/socketio/__init__.py", line 3, in <module> from .client import Client File "/usr/lib/python3/dist-packages/socketio/client.py", line 7, in <module> import engineio File "/usr/lib/python3/dist-packages/engineio/__init__.py", line 8, in <module> from .asyncio_client import AsyncClient File "/usr/lib/python3/dist-packages/engineio/asyncio_client.py", line 7, in <module> import aiohttp File "/usr/lib/python3/dist-packages/aiohttp/__init__.py", line 6, in <module> from .client import ( File "/usr/lib/python3/dist-packages/aiohttp/client.py", line 35, in <module> from . import hdrs, http, payload File "/usr/lib/python3/dist-packages/aiohttp/http.py", line 7, in <module> from .http_parser import ( File "/usr/lib/python3/dist-packages/aiohttp/http_parser.py", line 15, in <module> from .helpers import NO_EXTENSIONS, BaseTimerContext File "/usr/lib/python3/dist-packages/aiohttp/helpers.py", line 667, in <module> class CeilTimeout(async_timeout.timeout): TypeError: function() argument 'code' must be code, not str dpkg: error processing package powershell-empire (--configure): installed powershell-empire package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of kali-linux-headless: kali-linux-headless depends on powershell-empire; however: Package powershell-empire is not configured yet. dpkg: error processing package kali-linux-headless (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of kali-linux-default: kali-linux-default depends on kali-linux-headless; however: Package kali-linux-headless is not configured yet. dpkg: error processing package kali-linux-default (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of kali-linux-large: kali-linux-large depends on kali-linux-default; however: Package kali-linux-default is not configured yet. dpkg: error processing package kali-linux-large (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: powershell-empire kali-linux-headless kali-linux-default kali-linux-large
我不知道我應該在哪裡問這個問題。我在那裡有一個數據庫,這對我來說非常重要 - 這是我碩士學位的一部分,所以破壞伺服器並重新安裝 Kali 不是一個選擇。
清除包裝
sudo apt purge powershell-empire
重新安裝包
sudo apt install powershell-empire
…安裝成功
刪除/重新安裝 powershell-empire 怎麼樣?今天早上它適用於我的情況,因為我和你有同樣的問題。
免責聲明:我不是一個喜歡 linux 的人,所以 DYOR。在你這樣做之前考慮備份,因為你說如果發生任何事情你不能重新安裝 Kali。