libassimp-dev 中的问题阻止我使用 apt-get

libassimp-dev 中的问题阻止我使用 apt-get

我遇到了软件包冲突。似乎无论我做什么,都无法删除有问题的软件包。apt-get它似乎不会真正删除软件包,直到所有依赖项都得到解决。但由于冲突,我无法解决依赖项。

john@john-GA-880GMA-USB3:~$ sudo apt-get -f purge assimp-dev
Reading package lists... Done
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:
 ros-electric-assimp : Depends: assimp-dev but it is not going to be installed
 ros-fuerte-robot-model : Depends: libassimp-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我尝试 apt-get -f install 并收到错误:

sudo apt-get -f installReading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libassimp-dev
The following NEW packages will be installed:
  libassimp-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 0 B/88.8 kB of archives.
After this operation, 470 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 358595 files and directories currently installed.)
Unpacking libassimp-dev (from .../libassimp-dev_2.0.863+dfsg-2_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libassimp-dev_2.0.863+dfsg-2_i386.deb (--unpack):
 trying to overwrite '/usr/include/assimp/aiAnim.h', which is also in package assimp-dev 2.0.0.7-ubuntu1~oneiric1
Errors were encountered while processing:
 /var/cache/apt/archives/libassimp-dev_2.0.863+dfsg-2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

看起来两个包,libassimp-dev 和 assimp-dev,提供了完全相同的文件,这导致了冲突。

根据它们的包名,我认为它们是同一个东西的重复。

其中的关键一行如下:

dpkg: 错误处理 /var/cache/apt/archives/libassimp-dev_2.0.863+dfsg-2_i386.deb (--unpack): 尝试覆盖“/usr/include/assimp/aiAnim.h”,它也在包中assimp-dev2.0.0.7-ubuntu1~oneiric1

(我添加了粗体)

我发现这个帖子里有人遇到了同样的问题那里的答案给出了一些建议。

如果我是你,我会首先检查是否sudo aptitude purge libassimp-dev有帮助 - 如果它有效,那么它会为你提供几种不同的方法来解决你问题第一部分的冲突。

笔记如果您沿着这条路线走dpkg -i --force-overwrite,您只想应用 libassimp-dev 的修复程序,而不是 yaml-cpp 的修复程序,因为您实际上并没有遇到那个。

相关内容