Skip to content

❗ Bug Report: GPG Key Missing for ROS 2 Humble #3

@Oyefusi-Samuel

Description

@Oyefusi-Samuel

Description
While installing ROS 2 Humble packages (e.g., rqt, rqt_graph, and custom packages with rosdep), I encountered an error due to a missing GPG key for the ROS 2 apt repository. This prevented apt from securely updating or installing any ROS packages.

Error Message:
W: GPG error: http://packages.ros.org/ros2/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
E: The repository 'http://packages.ros.org/ros2/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

Steps to Reproduce

Run sudo apt update on a system with ROS 2 Humble set up using the ROS2 env.

Attempt to install a ROS package using sudo apt install ros-humble-rqt.

Observe the GPG error due to the missing key.

Expected Behavior
apt should securely fetch and install packages from the ROS 2 repository without signature errors.

Actual Behavior
All ROS 2 package installations fail due to a missing repository signature key.

✅ Solution / Fix

Remove old ROS key if it exists

sudo rm /usr/share/keyrings/ros-archive-keyring.gpg

I resolved the issue by manually updating the GPG key using the following commands:

sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc \
  | sudo gpg --dearmor -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" \
  | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update

After running the above steps, I was able to install all ROS 2 packages and dependencies successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions