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
내가 말했듯이 모든 것이 잘 작동하며 재부팅이 필요하지 않습니다.