当前位置:   article > 正文

ubuntu22.04安装ros2时遇到的软件包依赖问题_reading package lists... done building dependency

reading package lists... done building dependency tree... done reading state

安装ros2时,我们输入:

sudo apt-get install ros-humble-desktop
  • 1

可能会出现以下问题:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libicu-dev : Depends: libicu70 (= 70.1-2) but 70.1-2ubuntu1 is to be installed
 zlib1g-dev : Depends: zlib1g (= 1:1.2.11.dfsg-2ubuntu9) but 1:1.2.11.dfsg-2ubuntu9.1 is to be installed
E: Unable to correct problems, you have held broken packages.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

中文意思为:

以下软件包还不满足依赖:
 libicu-dev : Depends: libicu70 (= 70.1-2) but 70.1-2ubuntu1 将被安装
 zlib1g-dev : Depends: zlib1g (= 1:1.2.11.dfsg-2ubuntu9) but 1:1.2.11.dfsg-2ubuntu9.1 将被安装
E: Unable to correct problems, you have held broken packages.
  • 1
  • 2
  • 3
  • 4

解决办法:
在这里插入图片描述在软件和更新中,把上述选项保持一致
在这里插入图片描述在开发者选项中勾选超前的更新。
之后在终端中:

sudo apt-get update
sudo apt-get upgrade
  • 1
  • 2

之后输入:

sudo apt-get install ros-humble-desktop
  • 1

如下图所示,即可完成安装:
在这里插入图片描述

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号