rosdep install --from-paths src --ignore-src -r -y
ERROR: the
following packages/stacks could not have their rosdep keys resolved to
system dependencies: gazebo_grasp_plugin: Cannot locate rosdep
definition for [catkin] Continuing to install resolvable
dependencies… executing command [sudo -H apt-get install -y
ros-humble-warehouse-ros-mongo] 正在读取软件包列表… 完成 正在分析软件包的依赖关系树… 完成
正在读取状态信息… 完成 E: 无法定位软件包
ros-humble-warehouse-ros-mongo ERROR: the following rosdeps failed to
install apt: command [sudo -H apt-get install -y
ros-humble-warehouse-ros-mongo] failed apt: Failed to detect
successful installation of [ros-humble-warehouse-ros-mongo]
遇到 “无法定位软件包” 的错误时,通常是因为缺少正确的ROS源或包未包含在当前的源列表中。以下是一些解决此问题的步骤:
- 确保ROS源已正确添加。
- 手动查找和安装缺失的依赖项。
- 确保使用正确的ROS和Ubuntu版本。
1. 安装缺失的依赖
运行 rosdep
命令时,你可以忽略无法解析的包(比如 catkin
),并继续安装其他依赖项。然后,你可以尝试手动安装 ros-humble-warehouse-ros-mongo
包。
如果仍然无法找到 ros-humble-warehouse-ros-mongo
,可能是因为该包不再在你的ROS版本中或包名错误。可以使用以下命令搜索该包:
apt-cache search warehouse
- 输出
apt-cache search warehouse
postgresql-14 - The World's Most Advanced Open Source Relational Database
libclass-std-perl - module for creating standard "inside-out" classes
postgresql-14-pglogical - Logical Replication Extension for PostgreSQL
puppet-terminus-puppetdb - Puppet data warehouse -- Puppet master terminus
puppetdb - Puppet data warehouse
puppetdb-doc - Puppet data warehouse - documentation
python3-readme-renderer - Library to safely render arbitrary README files into HTML
tryton-modules-sale-supply-drop-shipment - Tryton Application Platform (Sale Supply Drop Shipment Module)
tryton-modules-stock-product-location - Tryton Application Platform (Stock Product Location Module)
ros-humble-aws-robomaker-small-warehouse-world - AWS RoboMaker package for a warehouse world to use in manufacturing and logistics robot applications.
ros-humble-moveit-ros-warehouse - Components of MoveIt connecting to MongoDB
ros-humble-moveit-ros-warehouse-dbgsym - debug symbols for ros-humble-moveit-ros-warehouse
ros-humble-warehouse-ros - Persistent storage of ROS messages
ros-humble-warehouse-ros-dbgsym - debug symbols for ros-humble-warehouse-ros
ros-humble-warehouse-ros-sqlite - Implementation of warehouse_ros for sqlite
ros-humble-warehouse-ros-sqlite-dbgsym - debug symbols for ros-humble-warehouse-ros-sqlite
ros-iron-aws-robomaker-small-warehouse-world - AWS RoboMaker package for a warehouse world to use in manufacturing and logistics robot applications.
ros-iron-moveit-ros-warehouse - Components of MoveIt connecting to MongoDB
ros-iron-moveit-ros-warehouse-dbgsym - debug symbols for ros-iron-moveit-ros-warehouse
ros-iron-warehouse-ros - Persistent storage of ROS messages
ros-iron-warehouse-ros-dbgsym - debug symbols for ros-iron-warehouse-ros
ros-iron-warehouse-ros-sqlite - Implementation of warehouse_ros for sqlite
ros-iron-warehouse-ros-sqlite-dbgsym - debug symbols for ros-iron-warehouse-ros-sqlite
ros-rolling-aws-robomaker-small-warehouse-world - AWS RoboMaker package for a warehouse world to use in manufacturing and logistics robot applications.
ros-rolling-moveit-ros-warehouse - Components of MoveIt connecting to MongoDB
ros-rolling-moveit-ros-warehouse-dbgsym - debug symbols for ros-rolling-moveit-ros-warehouse
ros-rolling-warehouse-ros - Persistent storage of ROS messages
ros-rolling-warehouse-ros-dbgsym - debug symbols for ros-rolling-warehouse-ros
ros-rolling-warehouse-ros-sqlite - Implementation of warehouse_ros for sqlite
ros-rolling-warehouse-ros-sqlite-dbgsym - debug symbols for ros-rolling-warehouse-ros-sqlite
从搜索结果来看,确实没有找到名为 ros-humble-warehouse-ros-mongo
的包。不过,找到了与“仓库”相关的其他一些包,比如 ros-humble-moveit-ros-warehouse
和 ros-humble-warehouse-ros
。
安装替代包:
你可以尝试安装与“仓库”相关的包,例如 ros-humble-warehouse-ros
和 ros-humble-moveit-ros-warehouse
。使用以下命令:
sudo apt-get install ros-humble-warehouse-ros ros-humble-moveit-ros-warehouse
- 输出
sudo apt-get install ros-humble-warehouse-ros ros-humble-moveit-ros-warehouse
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
ros-humble-moveit-ros-warehouse 已经是最新版 (2.5.5-1jammy.20240830.224717)。
ros-humble-warehouse-ros 已经是最新版 (2.0.5-1jammy.20240830.194835)。
ros-humble-warehouse-ros 已设置为手动安装。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。