解决未满足的依赖关系

解决未满足的依赖关系
vikiboy@BatCave:~$ sudo apt-get install ros-indigo-openni-launch 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-indigo-openni-launch is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libopenni-sensor-primesense-dev : Depends: libopenni-sensor-primesense0 (= 5.1.0.41-3+trusty1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

On running sudo apt-get -f install

vikiboy@BatCave:~$ sudo apt-get -f install 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  at dctrl-tools devscripts distro-info-data dput libaudclient2 libaudcore1
  libdistro-info-perl libexporter-lite-perl libio-stringy-perl libmowgli2
  libparse-debcontrol-perl python3-magic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libopenni-sensor-primesense0
The following NEW packages will be installed:
  libopenni-sensor-primesense0
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
3 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 ... 343931 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

两个包想要写入/etc/openni/GlobalDefaults.inilibopenni-sensor-pointclouds0包和libopenni-sensor-primesense0包。这不应该发生,并且是数据包中的错误。作为一个有点黑客的解决方案,我会尝试备份该文件,例如,如下所示:

sudo mv /etc/openni/GlobalDefaults.ini /etc/openni/GlobalDefaults.ini.back

然后,执行sudo apt-get -f install。运气好的话,它会通过。然后你应该执行

diff /etc/openni/GlobalDefaults.ini /etc/openni/GlobalDefaults.ini.back

检查配置中是否存在需要注意的重大差异。

相关内容