mysql - 无法删除损坏的 mysql 安装或修复依赖项(Kali 2)

标签 mysql dependencies debian apt-get dpkg

在升级 Kali2 发行版的过程中,我遇到了先有鸡还是先有蛋的问题。

当我尝试安装某些东西(任何东西)甚至自动删除时,我得到这个:

vlt@kali2:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libcrypt-ssleay-perl : Depends: perl (>= 5.24.1~rc4-1) but 5.20.2-3+deb8u6 is installed
                        Depends: perlapi-5.24.1
 libcurses-perl : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
                  Depends: perlapi-5.24.1
 libdbd-sqlite3-perl : Depends: perl (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
                       Depends: perlapi-5.24.1
 libdbi-perl : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
               Depends: perlapi-5.24.1
 libdigest-md4-perl : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
                      Depends: perlapi-5.24.1
 libfcgi-perl : Depends: perl (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
                Depends: perlapi-5.24.1
 libgtk2-perl : Depends: perl (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
                Depends: perlapi-5.24.1
 libhtml-parser-perl : Depends: perl (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
                       Depends: perlapi-5.24.1
 libmoose-perl : Depends: perl (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
                 Depends: perlapi-5.24.1
 libnet-ssh2-perl : Depends: perl (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
                    Depends: perlapi-5.24.1
 libpango-perl : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
                 Depends: perlapi-5.24.1
 libparams-classify-perl : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
                           Depends: perlapi-5.24.1
 libperl5.24 : Depends: perl-modules-5.24 (>= 5.24.1~rc4-1) but it is not installed
 libpurple0 : Depends: perl-base (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
              Depends: perlapi-5.24.1
 libscalar-list-utils-perl : Depends: perl (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
                             Depends: perlapi-5.24.1
 libsnmp-perl : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
                Depends: perlapi-5.24.1
 libsub-identify-perl : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
                        Depends: perlapi-5.24.1
 libsub-name-perl : Depends: perl (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
                    Depends: perlapi-5.24.1
 libterm-readline-gnu-perl : Depends: perl (>= 5.24.1~rc3-3) but 5.20.2-3+deb8u6 is installed
                             Depends: perlapi-5.24.1
 libvariable-magic-perl : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
                          Depends: perlapi-5.24.1
 libxml-libxml-perl : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
                      Depends: perlapi-5.24.1
 mysql-server-5.5 : Depends: mysql-client-5.5 (>= 5.5.50-0+deb8u1) but it is not installable
                    Depends: mysql-server-core-5.5 (>= 5.5.50-0+deb8u1) but it is not installable
 perl-tk : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
           Depends: perlapi-5.24.1
 texinfo : Depends: perl (>= 5.24.1~rc3-2) but 5.20.2-3+deb8u6 is installed
           Depends: perlapi-5.24.1
 vlc-nox : Depends: libtag1c2a (>= 1.9.1) but it is not installable
E: Unmet dependencies. Try using -f.

当我尝试修复时,出现 mysql-server-5.6 问题:

vlt@kali2:~$ sudo apt-get -f 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:
  gstreamer0.10-gconf gstreamer0.10-nice gstreamer0.10-plugins-bad gstreamer0.10-x libbasicusageenvironment0 libcdaudio1 libchromaprint0 libdirac-encoder0 libdvbpsi9 libexporter-tiny-perl libfreerdp-rail1.1
  libgroupsock1 libgstreamer-plugins-bad0.10-0 libintl-perl liblircclient0 liblist-moreutils-perl liblivemedia23 libmhash2 libmimic0 libpostproc52 libraptor2-0 librasqal3 librdf0 libslv2-9 libsoundtouch0
  libtask-weaken-perl libusageenvironment1 libwildmidi1 libxcb-composite0 libyajl2 vlc-nox
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  apt apt-utils glib-networking glib-networking-common glib-networking-services libalgorithm-diff-xs-perl libapt-inst2.0 libapt-pkg-perl libapt-pkg5.0 libbasicusageenvironment1 libcairo-perl
  libclass-c3-xs-perl libclass-load-xs-perl libcpan-meta-perl libdbd-mysql-perl libdevel-caller-perl libdevel-lexalias-perl libdigest-crc-perl libdouble-conversion1 libdvbpsi10 libebml4v5
  libexporter-tiny-perl libfile-fcntllock-perl libglib-perl libgroupsock8 liblirc-client0 liblircclient0 liblist-moreutils-perl liblivemedia57 liblocale-gettext-perl liblz4-1 libmariadbclient18
  libmatroska6v5 libnet-dbus-perl libnet-pcap-perl libnet-rawip-perl libnet-ssleay-perl libpackage-stash-xs-perl libpadwalker-perl libparams-util-perl libpcre16-3 libpcsc-perl libproxy-tools libproxy1v5
  libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libqt5x11extras5 libsocket6-perl libterm-readkey-perl libtext-charwidth-perl libtext-iconv-perl libtext-soundex-perl
  libusageenvironment3 libvlc-bin libvlccore8 libxcb-xinerama0 libxml-parser-perl mariadb-common mysql-common mysql-server mysql-server-5.6 mysql-server-core-5.6 perl perl-base perl-modules-5.24
  phonon-backend-vlc qt5-gtk-platformtheme qttranslations5-l10n vlc vlc-bin vlc-data vlc-l10n vlc-nox vlc-plugin-base vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba vlc-plugin-skins2
  vlc-plugin-video-output vlc-plugin-video-splitter vlc-plugin-visualization
Suggested packages:
  apt-doc libfont-freetype-perl lirc qt5-image-formats-plugins qtwayland5 tinyca perl-doc libdvdcss2
The following packages will be REMOVED:
  libebml4 libmatroska6 libproxy1 mysql-server-5.5 perl-modules vlc-plugin-pulse
The following NEW packages will be installed:
  libapt-inst2.0 libapt-pkg5.0 libbasicusageenvironment1 libdouble-conversion1 libdvbpsi10 libebml4v5 libexporter-tiny-perl libgroupsock8 liblirc-client0 liblivemedia57 liblz4-1 libmariadbclient18
  libmatroska6v5 libpcre16-3 libproxy1v5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5svg5 libqt5widgets5 libqt5x11extras5 libusageenvironment3 libvlc-bin libxcb-xinerama0 mariadb-common
  mysql-server-5.6 mysql-server-core-5.6 perl-modules-5.24 qt5-gtk-platformtheme qttranslations5-l10n vlc-bin vlc-l10n vlc-plugin-base vlc-plugin-qt vlc-plugin-skins2 vlc-plugin-video-output
  vlc-plugin-video-splitter vlc-plugin-visualization
The following packages will be upgraded:
  apt apt-utils glib-networking glib-networking-common glib-networking-services libalgorithm-diff-xs-perl libapt-pkg-perl libcairo-perl libclass-c3-xs-perl libclass-load-xs-perl libcpan-meta-perl
  libdbd-mysql-perl libdevel-caller-perl libdevel-lexalias-perl libdigest-crc-perl libfile-fcntllock-perl libglib-perl liblircclient0 liblist-moreutils-perl liblocale-gettext-perl libnet-dbus-perl
  libnet-pcap-perl libnet-rawip-perl libnet-ssleay-perl libpackage-stash-xs-perl libpadwalker-perl libparams-util-perl libpcsc-perl libproxy-tools libsocket6-perl libterm-readkey-perl libtext-charwidth-perl
  libtext-iconv-perl libtext-soundex-perl libvlccore8 libxml-parser-perl mysql-common mysql-server perl perl-base phonon-backend-vlc vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-samba
46 upgraded, 39 newly installed, 6 to remove and 583 not upgraded.
145 not fully installed or removed.
Need to get 0 B/46.4 MB of archives.
After this operation, 99.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Reading changelogs... Done
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 352471 files and directories currently installed.)
Preparing to unpack .../mysql-server-core-5.6_5.6.30-1_amd64.deb ...
Unpacking mysql-server-core-5.6 (5.6.30-1) ...
dpkg: error processing archive /var/cache/apt/archives/mysql-server-core-5.6_5.6.30-1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/man/man1/innochecksum.1.gz', which is also in package mysql-server-5.5 5.5.50-0+deb8u1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-core-5.6_5.6.30-1_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

自下而上,错误是:

trying to overwrite '/usr/share/man/man1/innochecksum.1.gz', which is also in package mysql-server-5.5 5.5.50-0+deb8u1

我在其他线程上看到了这个 mysql 5.5/5.6 dpkg 错误,但没有人回答这些错误。

我尝试删除 mysql-server-5.5(使用 --purge),但如前所述,我所做的每个 apt-get 操作都会导致上述依赖项问题。我可以使用 dpkg 解决这个问题吗?关于尝试什么有什么建议吗?

谢谢你的灯!

最佳答案

好的,搞定了。

我首先清理损坏的更新

apt-get clean

然后我注释掉了“滚动”存储库,并将遗留存储库添加为存储库:

#deb http://http.kali.org/kali kali-rolling main non-free contrib
deb http://old.kali.org/kali moto main non-free contrib

然后我可以通过执行以下操作来修复困惑:

apt-get update

apt-get -f install

然后我重新启用了新的存储库:

deb http://http.kali.org/kali kali-rolling main non-free contrib
#deb http://old.kali.org/kali moto main non-free contrib

最后...

sudo apt-get update

sudo apt-get dist-upgrade

就是这样!

关于mysql - 无法删除损坏的 mysql 安装或修复依赖项(Kali 2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41408619/

相关文章:

mysql - SELECT 查询检查数据库之外的内容

linux - grep 限制字符 - 一行

mysql - SQL表中的两个唯一键

php - mysql连接第三个表,其中FK未直接链接

mysql - 使用时间戳的 Windows Server 08 mysqldump 变量文件名

node.js - 更新定义文件时如何修复损坏的 Typescript 定义

hibernate - 使用 hibernate、hibernate 注释和 ehcache 的 Maven 依赖项是什么?

java - ASTParser 依赖项

python - 为 python 2 和 python 3 安装 scipy

debian - debian 中的 Tomcat7 :wheezy Docker instance fails to start