无法修复损坏的软件包(apt-get -f install 不起作用)

无法修复损坏的软件包(apt-get -f install 不起作用)

我有以下无法更新的损坏软件包:

$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree... 50%
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:
 libgegl-0.3-0 : Depends: libjasper1 but it is not installed
 libopencv-highgui2.4v5 : Depends: libjasper1 but it is not installed
 libqt5core5a : Breaks: libqt5core5a:i386 (!= 5.5.1+dfsg-16ubuntu7) but 5.5.1+dfsg-16ubuntu7.2 is installed
 libqt5core5a:i386 : Recommends: qttranslations5-l10n:i386 but it is not installable
                     Breaks: libqt5core5a (!= 5.5.1+dfsg-16ubuntu7.2) but 5.5.1+dfsg-16ubuntu7 is installed
 libqt5svg5 : Depends: qtbase-abi-5-2-1 but it is not installable
              Breaks: libqt5svg5:i386 (!= 5.2.1-1) but 5.5.1-2build1 is installed
 libqt5svg5:i386 : Breaks: libqt5svg5 (!= 5.5.1-2build1) but 5.2.1-1 is installed
 libraw15 : Depends: libjasper1 but it is not installed
 libwmf0.2-7 : Breaks: libwmf0.2-7:i386 (!= 0.2.8.4-10.3ubuntu1.14.04.1) but 0.2.8.4-10.5ubuntu1 is installed
 libwmf0.2-7:i386 : Recommends: gsfonts:i386 but it is not installable
                    Breaks: libwmf0.2-7 (!= 0.2.8.4-10.5ubuntu1) but 0.2.8.4-10.3ubuntu1.14.04.1 is installed
E: Unmet dependencies. Try using -f.

运行“sudo apt-get -f install”时,我得到:

$ sudo apt-get install -f
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:
  exiv2:i386 gimp-data graphicsmagick:i386 kdelibs5-data libattica0.4 libdbusmenu-qt2 libdlrestrictions1 libdouble-conversion1v5
  libdouble-conversion1v5:i386 libevdev2:i386 libexiv2-14 libexiv2-14:i386 libgimp2.0 libgomp1:i386 libgraphicsmagick++-q16-12:i386
  libgraphicsmagick-q16-3:i386 libgudev-1.0-0:i386 libinput10:i386 libjasper1:i386 libkdecore5 libkdeui5 libkexiv2-11v5 libkexiv2-data
  libmtdev1:i386 libpcre16-3:i386 libqgsttools-p1 libqgsttools-p1:i386 libqt4-svg libqt5core5a:i386 libqt5dbus5:i386 libqt5gui5:i386
  libqt5multimedia5:i386 libqt5multimedia5-plugins libqt5multimedia5-plugins:i386 libqt5multimediaquick-p5 libqt5multimediaquick-p5:i386
  libqt5multimediawidgets5 libqt5multimediawidgets5:i386 libqt5network5:i386 libqt5opengl5 libqt5opengl5:i386 libqt5qml5 libqt5qml5:i386
  libqt5quick5 libqt5quick5:i386 libqt5sql5 libqt5sql5:i386 libqt5sql5-sqlite libqt5sql5-sqlite:i386 libqt5svg5:i386 libqt5widgets5:i386
  libqt5xml5 libqt5xml5:i386 libraw15:i386 libwacom2:i386 libwebp5:i386 libwmf0.2-7:i386 libxcb-icccm4:i386 libxcb-image0:i386
  libxcb-keysyms1:i386 libxcb-randr0:i386 libxcb-render-util0:i386 libxcb-shape0:i386 libxcb-util1:i386 libxcb-xkb1:i386
  libxkbcommon-x11-0:i386 python-appindicator python-gconf python-gi python-gobject python-pexpect python-ptyprocess python-xdg
  qml-module-qt-labs-folderlistmodel qml-module-qt-labs-folderlistmodel:i386 qml-module-qt-labs-settings qml-module-qtgraphicaleffects
  qml-module-qtgraphicaleffects:i386 qml-module-qtmultimedia qml-module-qtmultimedia:i386 qml-module-qtqml-models2
  qml-module-qtqml-models2:i386 qml-module-qtquick-controls qml-module-qtquick-controls:i386 qml-module-qtquick-dialogs
  qml-module-qtquick-layouts qml-module-qtquick-layouts:i386 qml-module-qtquick-privatewidgets qml-module-qtquick-window2
  qml-module-qtquick-window2:i386 qml-module-qtquick2 qml-module-qtquick2:i386 qt5-image-formats-plugins:i386
  qtdeclarative5-qtquick2-plugin
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libjasper1 libqt5core5a libqt5svg5 libwmf0.2-7
Suggested packages:
  libjasper-runtime libwmf0.2-7-gtk
The following NEW packages will be installed:
  libjasper1
The following packages will be upgraded:
  libqt5core5a libqt5svg5 libwmf0.2-7
3 upgraded, 1 newly installed, 0 to remove and 227 not upgraded.
10 not fully installed or removed.
Need to get 0 B/2 222 kB of archives.
After this operation, 364 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 266341 files and directories currently installed.)
Preparing to unpack .../libqt5core5a_5.5.1+dfsg-16ubuntu7.2_amd64.deb ...
Unpacking libqt5core5a:amd64 (5.5.1+dfsg-16ubuntu7.2) over (5.5.1+dfsg-16ubuntu7) ...
dpkg: error processing archive /var/cache/apt/archives/libqt5core5a_5.5.1+dfsg-16ubuntu7.2_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libqt5core5a/changelog.Debian.gz', which is different from other instances of package libqt5core5a:amd64
Preparing to unpack .../libqt5svg5_5.5.1-2build1_amd64.deb ...
Unpacking libqt5svg5:amd64 (5.5.1-2build1) over (5.2.1-1) ...
dpkg: error processing archive /var/cache/apt/archives/libqt5svg5_5.5.1-2build1_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libqt5svg5/copyright', which is different from other instances of package libqt5svg5:amd64
Preparing to unpack .../libjasper1_1.900.1-debian1-2.4ubuntu1_amd64.deb ...
Unpacking libjasper1:amd64 (1.900.1-debian1-2.4ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libjasper1_1.900.1-debian1-2.4ubuntu1_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libjasper1/changelog.Debian.gz', which is different from other instances of package libjasper1:amd64
Preparing to unpack .../libwmf0.2-7_0.2.8.4-10.5ubuntu1_amd64.deb ...
Unpacking libwmf0.2-7:amd64 (0.2.8.4-10.5ubuntu1) over (0.2.8.4-10.3ubuntu1.14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libwmf0.2-7_0.2.8.4-10.5ubuntu1_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/lintian/overrides/libwmf0.2-7', which is different from other instances of package libwmf0.2-7:amd64
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libqt5core5a_5.5.1+dfsg-16ubuntu7.2_amd64.deb
 /var/cache/apt/archives/libqt5svg5_5.5.1-2build1_amd64.deb
 /var/cache/apt/archives/libjasper1_1.900.1-debian1-2.4ubuntu1_amd64.deb
 /var/cache/apt/archives/libwmf0.2-7_0.2.8.4-10.5ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

当我尝试通过 Synaptic 删除或更新软件包时,出现以下信息:

E: /var/cache/apt/archives/libqt5core5a_5.5.1+dfsg-16ubuntu7.2_amd64.deb: trying to overwrite shared '/usr/share/doc/libqt5core5a/changelog.Debian.gz', which is different from other instances of package libqt5core5a:amd64
E: /var/cache/apt/archives/libqt5svg5_5.5.1-2build1_amd64.deb: trying to overwrite shared '/usr/share/doc/libqt5svg5/copyright', which is different from other instances of package libqt5svg5:amd64
E: /var/cache/apt/archives/libwmf0.2-7_0.2.8.4-10.5ubuntu1_amd64.deb: trying to overwrite shared '/usr/share/lintian/overrides/libwmf0.2-7', which is different from other instances of package libwmf0.2-7:amd64
E: /var/cache/apt/archives/libjasper1_1.900.1-debian1-2.4ubuntu1_amd64.deb: trying to overwrite shared '/usr/share/doc/libjasper1/changelog.Debian.gz', which is different from other instances of package libjasper1:amd64

我该如何修复损坏的包裹?我尝试过以下方法#171038,但对我而言毫无帮助。

答案1

我不得不在线搜索这些软件包,然后逐个下载并安装它们:

libicu52_52.1-3ubuntu0.5_amd64.deb
libicu52_52.1-3ubuntu0.5_i386.deb
libjasper1_1.900.1-14ubuntu3.3_amd64.deb
libjasper1_1.900.1-14ubuntu3.3_i386.deb
libqt5core5a_5.2.1+dfsg-1ubuntu14.3_amd64.deb
libqt5core5a_5.2.1+dfsg-1ubuntu14.3_i386.deb
libwmf0.2-7_0.2.8.4-10.3ubuntu1.14.04.1_amd64.deb
libwmf0.2-7_0.2.8.4-10.3ubuntu1.14.04.1_i386.deb

使用sudo dpkg -i --force-overwrite <package>

然后sudo apt-get install -fsudo apt autoremove

相关内容