Kali Linux에서 패키지를 설치하는 중 오류가 발생했습니다.

Kali Linux에서 패키지를 설치하는 중 오류가 발생했습니다.

나는 gnuplot 패키지를 사용하는 동안 지난 며칠 동안 이 문제에 직면했습니다.

먼저 실행했는데 dpkg --configure -a결과는 다음과 같습니다.

Processing triggers for tex-common (6.09) ...
Running mktexlsr. This may take some time... done.
dpkg: dependency problems prevent configuration of gnuplot-qt:
 gnuplot-qt depends on gnuplot-data (= 5.2.0+dfsg1-2); however:
  Package gnuplot-data is not installed.

dpkg: error processing package gnuplot-qt (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnuplot:
 gnuplot depends on gnuplot-qt | gnuplot-x11 | gnuplot-nox; however:
  Package gnuplot-qt is not configured yet.
  Package gnuplot-x11 is not installed.
  Package gnuplot-nox is not installed.
  Package gnuplot-qt which provides gnuplot-nox is not configured yet.

dpkg: error processing package gnuplot (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 gnuplot-qt
 gnuplot

그 후에 나는 다음을 시도합니다 apt-get update && apt-get upgrade.

Hit:1 http://ftp.cc.uoc.gr/mirrors/linux/kali/kali kali-rolling InRelease
Reading package lists... Done   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gnuplot-qt : Depends: gnuplot-data (= 5.2.0+dfsg1-2) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

마침내 apt --fix-broken install:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  castxml espeak-data firebird2.5-common firebird2.5-common-doc gccxml
  gdebi-core gnome-icon-theme-symbolic gnome-mime-data gnupg-agent gnuplot-tex
  gnuplot5-data gnuplot5-qt imagemagick-common iproute libasn1-8-heimdal
  libbind9-90 libblas-common libbonobo2-0 libbonobo2-common
  libboost-filesystem1.58.0 libboost-python1.58.0 libboost-system1.58.0
  libboost-thread1.58.0 libcamel-1.2-54 libclutter-gst-2.0-0 libcrypto++6
  libcrypto++9v5 libdbus-1-dev libdns100 libebook-1.2-16 libedataserver-1.2-21
  libemu2 libespeak1 libevent-core-2.0-5 libevent-openssl-2.0-5
  libevent-pthreads-2.0-5 libgdict-1.0-9 libgdict-common libgeos-3.5.0
  libgfortran3 libgif4 libglew1.13 libgmime-2.6-0 libgnome-2-0
  libgnome2-common libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra
  libgrilo-0.2-1 libgssapi3-heimdal libgtop-2.0-10 libhcrypto4-heimdal
  libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhunspell-1.3-0
  libhx509-5-heimdal libical1a libilmbase6v5 libisc95 libisccc90 libisccfg90
  libjasper1 libjavascriptcoregtk-3.0-0 libjim0.76 libjpeg9 libjs-mochikit
  libkdc2-heimdal libkrb5-26-heimdal libllvm3.7 liblouis9 liblua5.1-0
  liblwres90 libnm-glib-vpn1 libnm-gtk-common libntdb1 libopenexr6v5
  liborbit-2-0 libpango1.0-0 libpangox-1.0-0 libpoppler57 libpth20
  libpython3.4-minimal libpython3.4-stdlib libpython3.5 libpython3.5-minimal
  libpython3.5-stdlib libqgsttools-p1 libqmi-glib1 libqt5multimedia5-plugins
  libqt5multimediawidgets5 libquvi-scripts libquvi7 libradare2-0.9.9 libregfi0
  libroken18-heimdal libtracker-control-1.0-0 libtracker-miner-1.0-0
  libtracker-sparql-1.0-0 libtrio2 libunistring0 liburcu4 libusbmuxd2
  libva-x11-1 libwebkitgtk-3.0-0 libwebpdemux1 libwebpmux1
  libwebrtc-audio-processing-0 libwind0-heimdal libwireshark6 libwiretap5
  libwsutil6 libzip2 python-alembic python-boltons python-characteristic
  python-cheetah python-ctypeslib python-dap python-dbus-dev python-distlib
  python-ecdsa python-editor python-formencode python-geoip2 python-geojson
  python-icalendar python-ipaddr python-lzma python-lzo python-maxminddb
  python-mpltoolkits.basemap python-ntdb python-opengl python-openid
  python-paste python-pastedeploy python-pastedeploy-tpl python-pastescript
  python-pyatspi python-pycryptopp python-pylibemu python-pyotp
  python-pyqtgraph python-qt4-gl python-scgi python-smoke-zephyr
  python-tempita python-tidylib python-tzlocal python3.4 python3.4-minimal
  ruby-rainbow ruby-rexec ruby2.2-dev
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  gnuplot-data
The following NEW packages will be installed:
  gnuplot-data
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 166 kB of archives.
After this operation, 416 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ftp.cc.uoc.gr/mirrors/linux/kali/kali kali-rolling/main amd64 gnuplot-data all 5.2.0+dfsg1-2 [166 kB]
Fetched 166 kB in 1s (99.8 kB/s)                
(Reading database ... 351586 files and directories currently installed.)
Preparing to unpack .../gnuplot-data_5.2.0+dfsg1-2_all.deb ...
Unpacking gnuplot-data (5.2.0+dfsg1-2) ...
dpkg: error processing archive /var/cache/apt/archives/gnuplot-data_5.2.0+dfsg1-2_all.deb (--unpack):
 trying to overwrite '/usr/share/texmf/tex/latex/gnuplot/gnuplot-lua-tikz-common.tex', which is also in package gnuplot-tex 4.6.6-3
Errors were encountered while processing:
 /var/cache/apt/archives/gnuplot-data_5.2.0+dfsg1-2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

apt autoremove결국 apt-get -f install동일한 gnuplot-data 문제가 발생했습니다.


출력 sudo apt purge gnuplot{,-qt,-data,-tex}:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'gnuplot-data' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gnuplot5-data : Depends: gnuplot-tex but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

출력 sudo apt install gnuplot:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
gnuplot is already the newest version (5.2.0+dfsg1-2).
gnuplot set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gnuplot-qt : Depends: gnuplot-data (= 5.2.0+dfsg1-2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

아무 것도 하지 않는 것 같아서 sudo apt purge gnuplot{,-qt,-data,-tex} gnuplot5{,-qt,-data}gnuplot5-tex가 없어서 시도해 보았습니다.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'gnuplot5' is not installed, so not removed
Package 'gnuplot-data' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  aglfn castxml espeak-data firebird2.5-common firebird2.5-common-doc gccxml
  gdebi-core gnome-icon-theme-symbolic gnome-mime-data gnupg-agent
  imagemagick-common iproute libasn1-8-heimdal libbind9-90 libblas-common
  libbonobo2-0 libbonobo2-common libboost-filesystem1.58.0
  libboost-python1.58.0 libboost-system1.58.0 libboost-thread1.58.0
  libcamel-1.2-54 libclutter-gst-2.0-0 libcrypto++6 libcrypto++9v5
  libdbus-1-dev libdns100 libebook-1.2-16 libedataserver-1.2-21 libemu2
  libespeak1 libevent-core-2.0-5 libevent-openssl-2.0-5
  libevent-pthreads-2.0-5 libgdict-1.0-9 libgdict-common libgeos-3.5.0
  libgfortran3 libgif4 libglew1.13 libgmime-2.6-0 libgnome-2-0
  libgnome2-common libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra
  libgrilo-0.2-1 libgssapi3-heimdal libgtop-2.0-10 libhcrypto4-heimdal
  libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhunspell-1.3-0
  libhx509-5-heimdal libical1a libilmbase6v5 libisc95 libisccc90 libisccfg90
  libjasper1 libjavascriptcoregtk-3.0-0 libjim0.76 libjpeg9 libjs-mochikit
  libkdc2-heimdal libkrb5-26-heimdal libllvm3.7 liblouis9 liblua5.1-0
  liblwres90 libnm-glib-vpn1 libnm-gtk-common libntdb1 libopenexr6v5
  liborbit-2-0 libpango1.0-0 libpangox-1.0-0 libpoppler57 libpth20
  libpython3.4-minimal libpython3.4-stdlib libpython3.5 libpython3.5-minimal
  libpython3.5-stdlib libqgsttools-p1 libqmi-glib1 libqt5multimedia5-plugins
  libqt5multimediawidgets5 libquvi-scripts libquvi7 libradare2-0.9.9 libregfi0
  libroken18-heimdal libtracker-control-1.0-0 libtracker-miner-1.0-0
  libtracker-sparql-1.0-0 libtrio2 libunistring0 liburcu4 libusbmuxd2
  libva-x11-1 libwebkitgtk-3.0-0 libwebpdemux1 libwebpmux1
  libwebrtc-audio-processing-0 libwind0-heimdal libwireshark6 libwiretap5
  libwsutil6 libzip2 python-alembic python-boltons python-characteristic
  python-cheetah python-ctypeslib python-dap python-dbus-dev python-distlib
  python-ecdsa python-editor python-formencode python-geoip2 python-geojson
  python-icalendar python-ipaddr python-lzma python-lzo python-maxminddb
  python-mpltoolkits.basemap python-ntdb python-opengl python-openid
  python-paste python-pastedeploy python-pastedeploy-tpl python-pastescript
  python-pyatspi python-pycryptopp python-pylibemu python-pyotp
  python-pyqtgraph python-qt4-gl python-scgi python-smoke-zephyr
  python-tempita python-tidylib python-tzlocal python3.4 python3.4-minimal
  ruby-rainbow ruby-rexec ruby2.2-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  gnuplot* gnuplot-qt* gnuplot-tex* gnuplot5-data* gnuplot5-qt*
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
10 not fully installed or removed.
After this operation, 6,452 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 352000 files and directories currently installed.)
Removing gnuplot (5.2.0+dfsg1-2) ...
Removing gnuplot-qt (5.2.0+dfsg1-2) ...
Removing gnuplot5-qt (5.0.2+dfsg1-1) ...
Removing gnuplot5-data (5.0.2+dfsg1-1) ...
Removing gnuplot-tex (4.6.6-3) ...
Processing triggers for tex-common (6.09) ...
Running mktexlsr. This may take some time... done.
Setting up exploitdb (20171114-0kali1) ...
Processing triggers for menu (2.1.47+b1) ...
Setting up aptitude-common (0.8.9-1) ...
Processing triggers for libc-bin (2.24-17) ...
Setting up libio-string-perl (1.08-3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libcwidget3v5:amd64 (0.5.17-6) ...
Setting up aptitude-doc-en (0.8.9-1) ...
Setting up libclass-accessor-perl (0.51-1) ...
Setting up aptitude (0.8.9-1) ...
update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode
Setting up libparse-debianchangelog-perl (1.2.0-12) ...
(Reading database ... 351903 files and directories currently installed.)
Purging configuration files for gnuplot5-qt (5.0.2+dfsg1-1) ...
Processing triggers for menu (2.1.47+b1) ...
Processing triggers for libc-bin (2.24-17) ...

아마도 gnuplot과 관련된 모든 것이 제거되었을 것입니다. 재부팅하고 실행하겠습니다 sudo apt install gnuplot.

답변1

와 너 하나 갖고 있구나오래된 gnuplot-tex패키지가 문제를 일으키고 있습니다. 삭제:

sudo apt purge gnuplot-tex

모든 것이 정상으로 돌아가야 합니다. 위 사항이 부족하여 동작하지 않을 경우, 설치시 gnuplot-data다음을 이용하여 제거하시기 바랍니다 .gnuplot-texgnuplot-data

sudo aptitude install gnuplot-tex_ gnuplot-data

(명령이 있더라도 명확하게 _알려 줍니다 aptitude).gnuplot-texinstall

그래도 aptitude작동하지 않으므로 문제가 있는 패키지를 제거하고 다시 설치할 수 있습니다.

sudo apt purge gnuplot{,-qt,-data,-tex}
sudo apt install gnuplot

관련 정보