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を再インストールすることはオプションではありません。
答え1
明確なパッケージ
sudo apt purge powershell-empire
パッケージの再インストール
sudo apt install powershell-empire
...成功したインストール
答え2
powershell-empireをアンインストール/再インストールするにはどうですか?今朝、あなたと同じ問題があったので、私の場合は効果がありました。
免責事項:私はLinux愛好家ではないのでDYORです。何か起こった場合、Kaliを再インストールすることはできませんでしたので、これを行う前にバックアップを検討してください。
答え3
私は今朝あなたの地図に従いました。私だけをやったし、再起動は必要ありません。
$ powershell-empire -h
usage: empire.py [-h] {server,client} ...
positional arguments:
{server,client}
server Launch Empire Server
client Launch Empire CLI
optional arguments:
-h, --help show this help message and exit
┌──(userName㉿gentoo)-[~]
└─$ which powershell-empire
/usr/bin/powershell-empire
私が言ったように、すべてがうまく機能し、再起動は必要ありません。