E: 无法定位软件包 ros--gazebo-ros-pkgs

原因:
使用了zsh,zsh没有初始化ros的setup
编辑~/.zshrc文件,在末尾添加:

source /opt/ros/humble/setup.zsh

然后在终端运行

source ~/.zshrc

再次运行命令sudo apt install ros-$ROS_DISTRO-gazebo-ros-pkgs,成功
图片

posted @ 2026-03-14 19:30  热爱的力量  阅读(1)  评论(0)    收藏  举报