升级 PPA 版本时出现 Nemo dpkg 错误

升级 PPA 版本时出现 Nemo dpkg 错误

尝试升级到 Nemo 的 PPA 版本时,我收到以下 dpkg 错误:

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  cinnamon-translations python-requests python-urllib3
The following packages will be upgraded:
  nemo nemo-data python-cupshelpers system-config-printer-gnome

Preparing to unpack .../cinnamon-translations_2.4.0-20141104040041-trusty_all.deb ...
Unpacking cinnamon-translations (2.4.0-20141104040041-trusty) ...
dpkg: error processing archive /var/cache/apt/archives/cinnamon-translations_2.4.0-20141104040041-trusty_all.deb (--unpack):
 trying to overwrite '/usr/share/locale/ne/LC_MESSAGES/nemo.mo', which is also in package nemo-data 1.8.4-1.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/cinnamon-translations_2.4.0-20141104040041-trusty_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我尝试了能找到的常用建议,甚至尝试删除 nemo.mo 文件,但似乎都不起作用。有什么办法可以解决这个问题吗?我使用的是 Ubuntu 14.04 和 Unity,但已将 Nemo 设置为默认的火焰管理器。

答案1

OP的回答:

有时在安装/升级软件包时,您会收到一条错误消息,提示您尝试覆盖其他软件包中也存在的某个文件,而这会导致错误,使您无法安装/升级该软件包。

在大多数情况下,当某个文件从一个软件包移至较新版本的另一个软件包时,会发生此类错误。以下是此类错误的一个示例:

Unpacking replacement smplayer ...
dpkg: error processing /var/cache/apt/archives/smplayer_0.6.9+svn3595-1ppa1~maverick1_i386.deb (--unpack):
 trying to overwrite '/usr/share/smplayer/translations/smplayer_eu.qm', which is also in package smplayer-translations 0.6.9-1
dpkg-deb: subprocess paste killed by signal (Broken pipe)

修复此问题(在大多数情况下但可能不是全部)非常简单:查找导致错误的文件的路径 - 在我的第一个例子中是/var/cache/apt/archives/smplayer_0.6.9+svn3595-1ppa1~maverick1_i386.deb,然后运行以下命令:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/smplayer_0.6.9+svn3595-1ppa1~maverick1_i386.deb

如果--force-overwrite不起作用,你可以尝试--force-all一下。

在上面的命令中,将其替换为导致计算机上错误的/var/...确切路径。.deb

来源

相关内容