升级到 xenial 后的依赖问题

升级到 xenial 后的依赖问题

我最近升级到了 xenial,出现以下错误。如何解决使用 dpkg 时的依赖问题?

sudo dpkg --configure -a

Setting up libopenni0 (1.5.4.0-14) ...
mv: cannot stat '/var/lib/ni/licenses.xml.dpkg-old': No such file or directory
dpkg: error processing package libopenni0 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libpcl-io1.7:amd64:
 libpcl-io1.7:amd64 depends on libopenni0; however:
  Package libopenni0 is not configured yet.

dpkg: error processing package libpcl-io1.7:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpcl-visualization1.7:amd64:
 libpcl-visualization1.7:amd64 depends on libpcl-io1.7; however:
  Package libpcl-io1.7:amd64 is not configured yet.

dpkg: error processing package libpcl-visualization1.7:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpcl1.7:
 libpcl1.7 depends on libpcl-io1.7; however:
  Package libpcl-io1.7:amd64 is not configured yet.
 libpcl1.7 depends on libpcl-visualization1.7; however:
  Package libpcl-visualization1.7:amd64 is not configured yet.

dpkg: error processing package libpcl1.7 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libopenni-sensor-pointclouds0:
 libopenni-sensor-pointclouds0 depends on libopenni0; however:
  Package libopenni0 is not configured yet.

dpkg: error processing package libopenni-sensor-pointclouds0 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-pcl-conversions:
 ros-kinetic-pcl-conversions depends on libpcl1.7; however:
  Package libpcl1.7 is not configured yet.

dpkg: error processing package ros-kinetic-pcl-conversions (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-pcl-ros:
 ros-kinetic-pcl-ros depends on libpcl-io1.7; however:
  Package libpcl-io1.7:amd64 is not configured yet.
 ros-kinetic-pcl-ros depends on ros-kinetic-pcl-conversions; however:
  Package ros-kinetic-pcl-conversions is not configured yet.

dpkg: error processing package ros-kinetic-pcl-ros (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-perception-pcl:
 ros-kinetic-perception-pcl depends on ros-kinetic-pcl-conversions; however:
  Package ros-kinetic-pcl-conversions is not configured yet.
 ros-kinetic-perception-pcl depends on ros-kinetic-pcl-ros; however:
  Package ros-kinetic-pcl-ros is not configured yet.

dpkg: error processing package ros-kinetic-perception-pcl (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openni-utils:
 openni-utils depends on libopenni0; however:
  Package libopenni0 is not configured yet.

dpkg: error processing package openni-utils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libopenni-dev:
 libopenni-dev depends on libopenni0 (= 1.5.4.0-14); however:
  Package libopenni0 is not configured yet.

dpkg: error processing package libopenni-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpcl-dev:
 libpcl-dev depends on libopenni-dev; however:
  Package libopenni-dev is not configured yet.
 libpcl-dev depends on libpcl1.7 (= 1.7.2-14build1); however:
  Package libpcl1.7 is not configured yet.

dpkg: error processing package libpcl-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-perception:
 ros-kinetic-perception depends on ros-kinetic-perception-pcl; however:
  Package ros-kinetic-perception-pcl is not configured yet.

dpkg: error processing package ros-kinetic-perception (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ros-kinetic-desktop-full:
 ros-kinetic-desktop-full depends on ros-kinetic-perception; however:
  Package ros-kinetic-perception is not configured yet.

dpkg: error processing package ros-kinetic-desktop-full (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
 libopenni0
 libpcl-io1.7:amd64
 libpcl-visualization1.7:amd64
 libpcl1.7
 libopenni-sensor-pointclouds0
 ros-kinetic-pcl-conversions
 ros-kinetic-pcl-ros
 ros-kinetic-perception-pcl
 openni-utils
 libopenni-dev
 libpcl-dev
 ros-kinetic-perception
 ros-kinetic-desktop-full

答案1

apt-get 删除并清除所有 libopenni 包,您可能必须 sudo rm -rf /var/lib/ni,然后dpkg -l | grep openni应该是空白的,然后重新安装 libopenni0,然后其他包应该可以正常工作。

答案2

对我而言唯一有用的就是自己创建缺失的文件(欺骗配置)...

$ sudo touch /var/lib/ni/licenses.xml.dpkg-old
$ sudo touch /var/lib/ni/modules.xml.dpkg-old

然后我就可以:

$ sudo apt-get purge libopenni*

然后继续执行您要做的事情...

相关内容