Kodi 在 Ubuntu 16.04 上安装失败

Kodi 在 Ubuntu 16.04 上安装失败

当我尝试安装 Kodi 时,出现以下信息:

root@xKaganovich:/home/kaganovich# apt-get install kodi
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fonts-roboto fonts-roboto-hinted kodi-data libcec-platform1v5 libcec3
  libfstrcmp0 libhdhomerun2 libjs-iscroll libsdl2-2.0-0 libsndio6.1
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  kodi-pvr-mythtv kodi-pvr-vuplus kodi-pvr-vdr-vnsi kodi-pvr-njoy
  kodi-pvr-nextpvr kodi-pvr-mediaportal-tvserver kodi-pvr-tvheadend-hts
  kodi-pvr-dvbviewer kodi-pvr-argustv kodi-pvr-iptvsimple
  kodi-audioencoder-vorbis kodi-audioencoder-flac kodi-audioencoder-lame
The following NEW packages will be installed:
  kodi
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/20.0 MB of archives.
After this operation, 37.1 MB of additional disk space will be used.
(Reading database ... 264739 files and directories currently installed.)
Preparing to unpack .../kodi_2%3a17.6+git20171114.2125-final-0xenial_all.deb ...
Unpacking kodi (2:17.6+git20171114.2125-final-0xenial) ...
dpkg: error processing archive /var/cache/apt/archives/kodi_2%3a17.6+git20171114.2125-final-0xenial_all.deb (--unpack):
 trying to overwrite '/usr/share/kodi/media/icon32x32.png', which is also in package kodi-data 15.2+dfsg1-3ubuntu1.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for menu (2.1.47ubuntu1.16.04.1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/kodi_2%3a17.6+git20171114.2125-final-0xenial_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我该如何解决这个问题?

答案1

你有一个文件冲突。两个软件包试图提供同一个文件,而这在基于 Debian 的系统中是不允许的。

软件包kodi 2:17.6+git20171114.2125-final-0xenialkodi-data 15.2+dfsg1-3ubuntu1.1冲突。它们无法同时安装。这通常发生在软件包来自不同来源时。

有两种方法可以解决这个问题。

1) 选择要保留的软件包,卸载被拒绝源中的所有软件包,然后删除被拒绝源。保留被拒绝源中的软件包可能会导致版本冲突或更多文件冲突。

2) 使用 apt 的--force标志同意覆盖文件。这解决了今天的问题,但每次升级软件包时,问题可能会再次出现。

防止此问题的简单方法是限制非 Ubuntu 源、在尝试失败后删除实验性源以及偶尔apt autoremove清理系统中的孤立包。

相关内容