由于依赖性问题,我目前无法安装任何东西。当我尝试运行时apt-get -f install
,发生了以下情况;
sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libopenni-sensor-primesense0
The following NEW packages will be installed:
libopenni-sensor-primesense0
0 to upgrade, 1 to newly install, 0 to remove and 306 not to upgrade.
2 not fully installed or removed.
Need to get 0 B/300 kB of archives.
After this operation, 1,354 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 228186 files and directories currently installed.)
Preparing to unpack .../libopenni-sensor-primesense0_5.1.0.41-3+trusty1_amd64.deb ...
Unpacking libopenni-sensor-primesense0 (5.1.0.41-3+trusty1) ...
dpkg: error processing archive /var/cache/apt/archives/libopenni-sensor-primesense0_5.1.0.41-3+trusty1_amd64.deb (--unpack):
trying to overwrite '/etc/openni/GlobalDefaults.ini', which is also in package libopenni-sensor-pointclouds0 5.1.0.41.1-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libopenni-sensor-primesense0_5.1.0.41-3+trusty1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
如果需要的话,我愿意重新开始,但我希望不会发生这种情况。如果能得到任何建议,我将不胜感激
答案1
这是一个包装问题,已提交错误这里。这意味着您可以(安全地)随时仅安装两个包中的一个。
保持libopenni-sensor-pointclouds0
, 运行sudo dpkg --remove --force-all libopenni-sensor-primesense0
和sudo apt-get install libopenni-sensor-pointclouds0
。
保持libopenni-sensor-primesense0
, 运行sudo dpkg --remove --force-all libopenni-sensor-pointclouds0
和sudo dpkg -i /var/cache/apt/archives/libopenni-sensor-primesense0_5.1.0.41-3+trusty1_amd64.deb
。
如果有任何其他包依赖于这两个包,则需要删除它们。
答案2
Saiarcot895,你的建议是正确的,我确实需要删除软件包并重新开始。解决这个问题的唯一区别是,当我使用:sudo dpkg --remove --force-all 时,出于某种原因,当我运行:sudo apt-get update 时,软件包仍为“待安装”。
为了解决这个问题,我只需要使用以下命令删除该包:sudo apt-get remove libopenni-sensor-primesense0
此命令从“要安装”列表中删除了该软件包,最终解决了我的问题。非常感谢大家的帮助,非常感谢。