The Repository is not Signed - Ubuntu ros2 installation

Roboticsros

Hi everyone,

I’m currently installing ros2 on Ubuntu (with Parallels) and ran into the following error:

<em>Hit:1 http://au.ports.ubuntu.com/ubuntu-ports jammy InRelease</em><br><em>Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease</em><br><em>Get:3 http://packages.ros.org/ros2/ubuntu jammy InRelease [4,673 B]</em><br><em>Hit:4 http://au.ports.ubuntu.com/ubuntu-ports jammy-updates InRelease</em><br><em>Err:3 http://packages.ros.org/ros2/ubuntu jammy InRelease</em><br><em>The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654</em><br><em>Get:5 http://ports.ubuntu.com/ubuntu-ports jammy-proposed InRelease [270 kB]</em><br><em>Hit:6 http://au.ports.ubuntu.com/ubuntu-ports jammy-backports InRelease</em><br><em>Reading package lists… Done</em><br><em>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</em><br><em>E: The repository 'http://packages.ros.org/ros2/ubuntu jammy InRelease' is not signed.</em><br><em>N: Updating from such a repository can't be done securely, and is therefore disabled by default.</em><br><em>N: See apt-secure(8) manpage for repository creation and user configuration details.</em>

I was following the official tutorial so I was little surprised to see this crop up. What I hadn’t realised was that I’d missed an error in the output dump while running sudo apt update:

chris@chris-parallels-ubuntu:~$ sudo apt update && sudo apt install curl gnupg lsb-release<br>sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg<br>Hit:1 http://au.ports.ubuntu.com/ubuntu-ports jammy InRelease<br>Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease<br>Get:3 http://packages.ros.org/ros2/ubuntu jammy InRelease [4,673 B]<br>Err:3 http://packages.ros.org/ros2/ubuntu jammy InRelease<br>The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654<br>Hit:4 http://au.ports.ubuntu.com/ubuntu-ports jammy-updates InRelease<br>Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-proposed InRelease<br>Hit:6 http://au.ports.ubuntu.com/ubuntu-ports jammy-backports InRelease<br>Reading package lists… Done<br>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<br>E: The repository 'http://packages.ros.org/ros2/ubuntu jammy InRelease' is not signed.<br>N: Updating from such a repository can't be done securely, and is therefore disabled by default.<br>N: See apt-secure(8) manpage for repository creation and user configuration details.<br>sudo: curl: command not found

This was a clean install of Ubuntu and I hadn’t yet installed curl. Luckily, this is a simple fix:

<code>sudo apt update</code>
<code>sudo apt install curl</code>