4

I try to install ROS 2 on ubuntu focal fosa (20.04).

I went along with this instruction, but after implementation this command:

sudo apt update

I got this problem:

Hit:1 http://ru.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://ru.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                                       
Hit:3 http://ru.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                                                   
Hit:4 http://download.opensuse.org/repositories/home:/Alexx2000/xUbuntu_20.04  InRelease                                                                              
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                                                      
Hit:6 http://packages.osrfoundation.org/gazebo/ubuntu-stable focal InRelease                                       
Get:7 http://packages.ros.org/ros2/ubuntu focal InRelease [4,670 B]
Err:7 http://packages.ros.org/ros2/ubuntu focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
Reading package lists... Done
W: GPG error: http://packages.ros.org/ros2/ubuntu focal 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 focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

And after that: sudo apt install ros-foxy-desktop

I got it:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ros-foxy-desktop
  • I have the same problem. The solution with updating the key does not work for me. This was recommended but did not work: `sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg` Are there any other ideas how to fix the problem? – Holger Apr 23 '22 at 10:51
  • If you want that community help you, you should provide us with your error terminal output, otherwise we can't help you. – Dmitriy Ogureckiy May 10 '23 at 16:21

2 Answers2

1

I fixed it. Basically, I had add the new repository key and delete the old one. This was worked for me:

https://answers.ros.org/question/379190/apt-update-signatures-were-invalid-f42ed6fbab17c654/

0

Please verify the ros-latest.list:

sudo gedit /etc/apt/sources.list.d/ros-latest.list

output: deb http://packages.ros.org/ros/ubuntu focal main

Also, dont forget to run sudo apt update

This worked for me.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Ebin Zacharias
  • 195
  • 1
  • 7