Skip to content

踩坑Robotics Stack Exchange2025-05-27

ROS2 Humble colcon build 提示 listing git files fail… ​

本文由 AI 根据公开内容整理,可能有误,请以原文为准:colcon build on ROS2 humble outputs "listing git files failed - pretending there aren't any"(Robotics Stack Exchange #104326)

状态:已解决

问题 ​

在 ROS2 Humble 工作空间中新增 my_robot_controller_2 后运行 colcon build --event-handlers console_direct+,输出 listing git files failed - pretending there aren't any。

环境 ​

ROS 2

解决办法 ​

  1. 用 pip3 list | grep setuptools 检查是否安装了 setuptools_scm。
  2. 如不需要该包,执行 pip3 uninstall setuptools-scm 卸载。
  3. 确保使用 setuptools 版本 58.2.0,必要时执行 pip3 install setuptools==58.2.0。

原问题作者:dragging_this;采纳答案作者:Daniele Affinita。原内容依 CC BY-SA 4.0 授权,本页摘要同样依 CC BY-SA 4.0 授权。

来源

本页事实对应的公开页面,以原文为准。

  1. Robotics Stack Exchange #104326:colcon build on ROS2 humble outputs "listing git files failed - pretending there aren't any"访问 2026-10-22