从 14 升级到 16 后,我现在得到了这个:
Do you want to continue? [Y/n]
Selecting previously unselected package libqtcore4:amd64.
(Reading database ... 282007 files and directories currently installed.)
Preparing to unpack .../libqtcore4_4%3a4.8.7+dfsg-5ubuntu2_amd64.deb ...
Unpacking libqtcore4:amd64 (4:4.8.7+dfsg-5ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/libqtcore4_4%3a4.8.7+dfsg-5ubuntu2_amd64.deb (--unpack):
trying to overwrite shared '/etc/xdg/Trolltech.conf', which is different from other instances of package libqtcore4:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
/var/cache/apt/archives/libqtcore4_4%3a4.8.7+dfsg-5ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
尝试删除 deb 包会导致以下结果:
sudo dpkg -i --force-overwrite /var/cache/apt/archives/libqtcore4_4%3a4.8.7+dfsg-5ubuntu2_amd64.deb
(Reading database ... 282007 files and directories currently installed.)
Preparing to unpack .../libqtcore4_4%3a4.8.7+dfsg-5ubuntu2_amd64.deb ...
Unpacking libqtcore4:amd64 (4:4.8.7+dfsg-5ubuntu2) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite shared '/etc/xdg/Trolltech.conf', which is different from other instances of package libqtcore4:amd64
dpkg: dependency problems prevent configuration of libqtcore4:amd64:
libqtcore4:amd64 depends on qtcore4-l10n; however:
Package qtcore4-l10n is not configured yet.
dpkg: error processing package libqtcore4:amd64 (--install):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
libqtcore4:amd64
答案1
这个问题困扰了我几个月,这条小消息解决了所有问题。真希望我早点看到这个!
sudo dpkg -i --force-overwrite /var/cache/apt/archives/libqtcore4_4%3a4.8.7+dfsg-5ubuntu2_amd64.deb
答案2
有一个Launchpad Ubuntu 跟踪器上有此错误。这是发布的解决方法,对我来说也有效:
sudo mv /etc/xdg/Trolltech.conf /etc/xdg/Trolltech.conf.old
sudo apt-get -f install
答案3
重启后一切恢复正常。