Hello every one,
I'm really new to Ubuntu and ROS, I'm trying to install ROS2 Foxy Fitsroy on Ubuntu 20.04 but when I want to add ROS 2 apt repository, I get an error because the public key F42ED6FBAB17C654 is not availabale.
I try to add the key using this command :
sudo apt-key adv --keyserver keyserver.ubuntu.com –recv-keys F42ED6FBAB17C654
But it occur an error :
Hit:1 http://fr.archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://ppa.launchpad.net/webupd8team/... focal InRelease Hit:3 http://fr.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://fr.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease Get:6 http://packages.ros.org/ros2/ubuntu focal InRelease [4 676 B] Err:6 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.
I also try to add all the missing GPG Keys using Yppa but it ain't do nothing.
I haven't been able to solve the problem, that why I'm asking for some help here. I hope I be precise enough. Thanks you in advance
Benjamin
Originally posted by benj21 on ROS Answers with karma: 3 on 2022-04-03
Post score: 0
Original comments
Comment by abhishek47 on 2022-04-04:
See the accepted answer to #q325039, particularly the syntax for adding a new key which looks a little different than yours .. probably should be something like
sudo -E apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key F42ED6FBAB17C654
Comment by benj21 on 2022-04-04:
Thanks for your answer abhishek47 unfortunately it didn't work for me I've still have the same issue.
By using the command line you gave me, it's result in this :
Executing: /tmp/apt-key-gpghome.JRQ96DR3TH/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F42ED6FBAB17C654
gpg: key F42ED6FBAB17C654: "Open Robotics [email protected]" not changed gpg: Total number processed: 1 gpg: unchanged: 1
But when i update, I've still got the issue
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.
Comment by ijnek on 2022-04-06:
You shouldn't have to manually add the key using the command you've provided.
Would you be able to update your question with the output from running the commands in Setup Sources?
Comment by ijnek on 2022-04-06:
I'm guessing you accidentally followed instructions for an older version of ROS or ROS2.
Try running
sudo apt-key del F42ED6FBAB17C654
to remove the key you've added, then runsudo apt update
, thensudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
, thenecho "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Comment by benj21 on 2022-04-09:
It's worked, I've successfully install ros2 after that.
Thanks you for your help!!! :)
And by the way sorry for posting the uptade in an answer.
Also, should I delete the post now or rename it with solved or something ?
Comment by ljaniec on 2022-04-09:
@ijnek should write his comments as an answer for you to accept :)
Comment by ijnek on 2022-04-10:
@benj21 I've moved my comment to a solution, which you should be able to mark as correct.