ROS2 MRPT 相关包缺失 / 损坏,导致 apt 依赖断裂,连安装简单的 xacro 都报错。 修复步骤(按顺序执行)

报错

点击查看代码
sudo apt install ros-$ROS_DISTRO-xacro

[sudo] password for gxt:

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

You might want to run 'apt --fix-broken install' to correct these.

The following packages have unmet dependencies:

ros-humble-mola-imu-preintegration : Depends: ros-humble-mrpt-libbase but it is not going to be installed

Depends: ros-humble-mrpt-libmath but it is not going to be installed

Depends: ros-humble-mrpt-libobs but it is not going to be installed

Depends: ros-humble-mrpt-libposes but it is not going to be installed

ros-humble-mola-pose-list : Depends: ros-humble-mrpt-libbase but it is not going to be installed

Depends: ros-humble-mrpt-libmaps but it is not going to be installed

Depends: ros-humble-mrpt-libmath but it is not going to be installed

Depends: ros-humble-mrpt-libobs but it is not going to be installed

Depends: ros-humble-mrpt-libposes but it is not going to be installed

ros-humble-mola-relocalization : Depends: ros-humble-mrpt-libbase but it is not going to be installed

Depends: ros-humble-mrpt-libobs but it is not going to be installed

Depends: ros-humble-mrpt-libposes but it is not going to be installed

Depends: ros-humble-mrpt-libmaps but it is not going to be installed

Depends: ros-humble-mrpt-libslam but it is not going to be installed

ros-humble-mp2p-icp : Depends: ros-humble-mrpt-libbase but it is not going to be installed

Depends: ros-humble-mrpt-libgui but it is not going to be installed

Depends: ros-humble-mrpt-libmaps but it is not going to be installed

Depends: ros-humble-mrpt-libmath but it is not going to be installed

Depends: ros-humble-mrpt-libobs but it is not going to be installed

Depends: ros-humble-mrpt-libopengl but it is not going to be installed

Depends: ros-humble-mrpt-libposes but it is not going to be installed

Depends: ros-humble-mrpt-libtclap but it is not going to be installed

ros-humble-mvsim : Depends: ros-humble-mrpt-libbase but it is not going to be installed

Depends: ros-humble-mrpt-libgui but it is not going to be installed

Depends: ros-humble-mrpt-libmaps but it is not going to be installed

Depends: ros-humble-mrpt-libmath but it is not going to be installed

Depends: ros-humble-mrpt-libobs but it is not going to be installed

Depends: ros-humble-mrpt-libopengl but it is not going to be installed

Depends: ros-humble-mrpt-libposes but it is not going to be installed

Depends: ros-humble-mrpt-libros-bridge but it is not going to be installed

Depends: ros-humble-mrpt-libtclap but it is not going to be installed

ros-humble-pose-cov-ops : Depends: ros-humble-mrpt-libposes but it is not going to be installed

Depends: ros-humble-mrpt-libros-bridge but it is not going to be installed

E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
1. 先修复损坏依赖(核心命令)

sudo apt --fix-broken install

image

image

posted @ 2026-07-19 13:24  阳光天气  阅读(3)  评论(0)    收藏  举报