![无法安装新软件错误](https://linux22.com/image/1138088/%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%E6%96%B0%E8%BD%AF%E4%BB%B6%E9%94%99%E8%AF%AF.png)
几天前我刚刚安装了 Ubuntu,非常喜欢它。但我遇到了一个无法解决的严重问题。当我尝试从 Ubuntu 软件中心安装某些东西时,出现了如下错误:
无法安装新软件,因为当前安装的软件有问题。要立即修复吗?
当我点击修复时,我收到另一个类似这样的错误:
installArchives() failed: (Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 244252 files and directories currently installed.)
Preparing to unpack .../kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_amd64.deb ...
Unpacking kde-config-telepathy-accounts (4:15.12.3-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/kde-config-telepathy-accounts_4%3a15.12.3-0ubuntu1_amd64.deb (--unpack):
trying to overwrite '/usr/share/accounts/services/google-im.service', which is also in package account-plugin-google 0.12+16.04.20160126-0ubuntu1
Processing triggers for libc-bin (2.23-0ubuntu3) ...
答案1
您想要安装kde-config-telepathy-accounts
,但此包中包含该文件/usr/share/accounts/services/google-im.service
。
但是该文件也是预安装包的一部分account-plugin-google
,因此已经存在。包管理器默认拒绝覆盖已经存在的文件,这就是您收到错误的原因。
您有三个选择:
不要
kde-config-telepathy-accounts
再次使用这些终端命令安装和清除部分安装的文件以及依赖于它的软件包:sudo apt-get purge kde-config-telepathy-accounts kde-telepathy-minimal kde-telepathy sudo apt-get autoremove
如果您不需要该 Google 帐户集成(也
unity-scope-gdrive
可能需要更多功能),您可以将其卸载。可以使用以下终端命令完成:
sudo apt-get purge account-plugin-google
但是您必须完成其他包的安装,如下所示:
sudo apt-get install kde-config-telepathy-accounts
您也可以忽略警告并
kde-config-telepathy-accounts
用其自己的版本覆盖该文件。sudo apt-get -o Dpkg::Options::="--force-overwrite" install kde-config-telepathy-accounts
但是,无法保证在使用其他版本覆盖此文件后,原始软件包
accounts-plugin-google
仍然与其兼容,不会崩溃或以非预期的方式运行!请谨慎操作!