ERROR ros2 build_error ai_generated true

ERROR: the following packages/stacks could not have their rosdep keys resolved

ID: ros2/rosdep-key-not-found

Also available as: JSON · Markdown
88%Fix Rate
90%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
2 active

Root Cause

rosdep cannot find a system dependency key declared in package.xml. Missing rosdep database update or custom keys.

generic

Workarounds

  1. 92% success Update the rosdep database first
    rosdep update && rosdep install --from-paths src --ignore-src -y
  2. 85% success Add custom rosdep key in a yaml file for non-standard packages
    echo 'yaml file:///path/to/custom.yaml' | sudo tee /etc/ros/rosdep/sources.list.d/50-custom.list
  3. 80% success Use --skip-keys for known-missing keys during development
    rosdep install --from-paths src --ignore-src -y --skip-keys='my_custom_dep'

Dead Ends

Common approaches that don't work:

  1. Add the dependency directly to CMakeLists.txt find_package without rosdep 80% fail

    The dependency still won't be installed on CI/CD or other developers' machines

  2. Remove the dependency from package.xml 85% fail

    Other packages depending on yours will have broken builds

Error Chain

Preceded by: