无法找到包

无法找到包

将我当前的操作系统 Kali 升级到 Kali 版本至 2017.2 后,无法安装任何软件 sudo apt-get install<package name>

我做了什么

我用过

sudo apt-get update
sudo apt-get dist-upgrade
reboot

以及升级后

我收到错误为

E:Unable to Locate package

尝试再次升级,但还是一样

我更改了存储库(从 kali linux 滚动的存储库中重新保存了内容)详细信息也做了相同的操作,但它正在继续相同的事情

之后我做了
如下

apt update ; apt full-upgrade -y ; apt autoremove -y

它告诉我要修复损坏的问题apt --fix-broken install

当我尝试安装损坏的链接时,出现错误:

root@Pavan:~# 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:
  apache2-data apache2-utils castxml chrome-gnome-shell espeak-data fakeroot
  firebird2.5-common firebird2.5-common-doc gccxml gdebi-core
  gir1.2-clutter-gst-2.0 gir1.2-gkbd-3.0 gir1.2-xkl-1.0 git-man
  gnome-characters gnome-icon-theme-symbolic gnome-logs gnome-mime-data
  gnupg-agent gnuplot-tex gnuplot5-data gnuplot5-qt gstreamer1.0-packagekit
  hwdata imagemagick-common iproute java-wrappers libadns1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap libasn1-8-heimdal
  libbasicusageenvironment0 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 libchromaprint0
  libclutter-gst-2.0-0 libconfig9 libcrypto++6 libcrypto++9v5
  libdirectfb-1.2-9 libdns100 libebook-1.2-16 libedataserver-1.2-21 libespeak1
  libevent-core-2.0-5 libevent-openssl-2.0-5 libevent-pthreads-2.0-5
  libfakeroot libgadu3 libgdict-1.0-9 libgdict-common libgeos-3.5.0
  libgfortran3 libgif4 libgles1-mesa libglew1.13 libgmime-2.6-0 libgnome-2-0
  libgnome2-common libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra
  libgrilo-0.2-1 libgroupsock1 libgssapi3-heimdal libgtkglext1 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-1.0-0 libjim0.76 libjpeg9 libjs-mochikit
  libkdc2-heimdal libkrb5-26-heimdal libladr4 liblircclient0 liblivemedia23
  libllvm3.7 liblouis9 liblua5.1-0 liblwres90 libmeanwhile1 libmimic0
  libnm-glib-vpn1 libnm-gtk-common libntdb1 libonig2 libopencv-contrib2.4v5
  libopencv-legacy2.4v5 libopencv-ml2.4v5 libopenexr6v5 liborbit-2-0
  libpango1.0-0 libpangox-1.0-0 libpcre16-3 libpng12-0 libpoppler57
  libpotrace0 libprotobuf-c1 libproxy1-plugin-gsettings
  libproxy1-plugin-networkmanager libptexenc1 libpth20 libpython-all-dev
  libpython3.4-minimal libpython3.4-stdlib libqdbm14 libqgsttools-p1
  libqmi-glib1 libqt5multimedia5-plugins libqt5multimediawidgets5
  libquvi-scripts libquvi7 libradare2-0.9.9 libregfi0 libroken18-heimdal
  libsynctex1 libtexlua52 libtexluajit2 libtracker-control-1.0-0
  libtracker-miner-1.0-0 libtracker-sparql-1.0-0 libtrio2 libtsk13
  libunistring0 liburcu4 libusageenvironment1 libusbmuxd2 libvncclient1
  libwebkitgtk-1.0-0 libwebpdemux1 libwebpmux1 libwebrtc-audio-processing-0
  libwildmidi1 libwind0-heimdal libwireshark6 libwiretap5 libwsutil6 libx86-1
  libxcb-composite0 libzephyr4 libzip2 libzzip-0-13 lmodern maltegoce nginx
  perl-openssl-defaults php-common php-mysql php5-cli php5-json php5-readline
  php7.0-common php7.0-mysql pidgin-data prover9 python-adns python-alembic
  python-all python-all-dev python-boltons python-bson python-bson-ext
  python-characteristic python-cheetah python-clamd python-cluster
  python-ctypeslib python-d2to1 python-dap python-darts-lib-utils-lru
  python-dbus-dev python-defusedxml python-distlib python-easygui python-ecdsa
  python-editor python-esmre python-formencode python-geoip2 python-geojson
  python-gitdb python-gridfs python-guess-language python-halberd
  python-icalendar python-ipaddr python-keyring python-keyrings.alt
  python-levenshtein python-lzma python-lzo python-markdown python-maxminddb
  python-metaconfig python-mpltoolkits.basemap python-msgpack
  python-ndg-httpsclient python-nltk python-ntdb python-opengl python-openid
  python-paste python-pastedeploy python-pastedeploy-tpl python-pastescript
  python-pdfminer python-phply python-pip python-pip-whl python-ply
  python-psutil python-pyatspi python-pybloomfiltermmap python-pycryptopp
  python-pygithub python-pymongo python-pymongo-ext python-pyotp python-pypdf
  python-pyqtgraph python-pyscard python-qrcode python-qt4-gl
  python-ruamel.ordereddict python-scgi python-secretstorage python-smmap
  python-smoke-zephyr python-soappy python-stopit python-svn python-tblib
  python-tempita python-tidylib python-tzlocal python-vulndb python-webkit
  python-wheel python-wstools python-xdot python3.4 python3.4-minimal
  read-edid rsync ruby-rainbow ruby-rexec ruby-snmp ruby2.2-dev
  system-config-printer t1utils tex-common u3-tool vim-gui-common vlc-nox
  vpnc-scripts
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  gnuplot-data vlc-bin
The following NEW packages will be installed:
  gnuplot-data vlc-bin
0 upgraded, 2 newly installed, 0 to remove and 107 not upgraded.
27 not fully installed or removed.
Need to get 0 B/295 kB of archives.
After this operation, 779 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 304842 files and directories currently installed.)
Preparing to unpack .../gnuplot-data_5.0.7+dfsg1-1_all.deb ...
Unpacking gnuplot-data (5.0.7+dfsg1-1) ...
dpkg: error processing archive /var/cache/apt/archives/gnuplot-data_5.0.7+dfsg1-1_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
Preparing to unpack .../vlc-bin_2.2.6-6_amd64.deb ...
Unpacking vlc-bin (2.2.6-6) ...
dpkg: error processing archive /var/cache/apt/archives/vlc-bin_2.2.6-6_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/cvlc', which is also in package vlc-nox 2.2.1-5+b1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/gnuplot-data_5.0.7+dfsg1-1_all.deb
 /var/cache/apt/archives/vlc-bin_2.2.6-6_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) 

有关我的版本的更多信息

DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2017.2"
VERSION_ID="2017.2"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.kali.org/"
SUPPORT_URL="http://forums.kali.org/"

但问题没有解决尝试帮助我

提前致谢

帕万

答案1

我通过以下方式解决了这个问题。

强制和详细地删除列表:

sudo rm /var/lib/apt/lists/* -vf

然后我尝试用以下方法修复损坏的问题:

sudo apt --fix-broken install

然后删除不必要的 650MB 文件:

sudo apt-get autoremove

最后:

sudo apt-get update

答案2

该错误来自vlc-nox,它位于已安装但不再需要的软件包列表中。

遗憾的是,fix-broken 正在尝试安装另一个 vlc 软件包,vlc-bin而不删除其他软件包...因此,删除vlc-nox,然后运行sudo apt-get install --fix-broken​​。

sudo apt-get remove vlc-nox

至于E:Unable to Locate package,没有更多输出,无法说出发生了什么,请提供完整的输出。

答案3

要删除麻烦的存储库,请启动软件和更新工具:

Ubuntu 20.04 中的软件和更新设置
(来源:i0.wp.com

转到“其他软件”选项卡并查找有问题的存储库。突出显示它,然后单击删除按钮将其从系统中删除。

删除 Ppa
(来源:i1.wp.com

相关内容