When we install the ros-related packages or perform sudo apt-get update on a linux system with ros installed, the following error will occur:
Get:1 http://packages.ros.org/ros/ubuntu focal InRelease [4,676 B]
Hit:2 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Err:1 http://packages.ros.org/ros/ubuntu focal InRelease
The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics [email protected]
Hit:5 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Fetched 4,676 B in 4s (1,078 B/s)
Reading package lists… Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://packages.ros.org/ros/ubuntu focal InRelease: The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics [email protected]
W: Failed to fetch http://packages.ros.org/ros/ubuntu/dists/focal/InRelease The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics [email protected]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Why does this error occur?
ROS uses the debian package management system to distribute software, so it needs a GPG key to ensure the accuracy and authority of the package, usually the default key expires after about 2 years, so we need to add a new ros related key to it.
How to fix it
Download the certificate and add it.
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.key
sudo apt-key add ./ros.key
After the installation is successful, the log information of OK will be displayed.
$ sudo apt update
...
Get:15 http://packages.ros.org/ros/ubuntu focal InRelease [4,676 B]
...
Fetched 2,671 kB in 2s (1,607 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
30 packages can be upgraded. Run 'apt list --upgradable' to see them.
Read More:
- [Solved] Invalid signature error for ROS repository while trying to do sudo apt-get update
- ros2 apt-get install error: E: Failed to fetch http://packages.ros.org…
- Ubuntu 20.04 Desktop Install sublime-text Error: “Certificate verification failed”
- [Solved] linux kernel load driver Error: module verification failed: signature and/or required key missing – tainting kernel
- [Solved] E Sub-process usrbindpkg returned an error code (1)
- Ubuntu20.04 install the ROS noetic version in catkin_Problems in make compilation
- [Solved] Ubuntu Update source error: Certificate verification failed: The certificate is NOT trusted.
- [Solved] Ubuntu Error: Error in the certificate verification
- How to Solve Rosep Problem in ROS Initialization (Sudo Rosep Init)
- [Solved] an error occurred when attempting to lock the volume
- Git error bad signature [How to Solve]
- Ubuntu18.04 Install ROS Error: rosdep update [How to Solve]
- [Solved] NameError: name ‘reload’ is not defined on ROS melody terminal
- ERROR conda.core.link:_execute(699): An error occurred while installing package ‘‘Rolling back trans
- [Solved] An unexpected error has occurred. Conda has prepared the above report.
- Deepin svn Error: svn: E120171: Error running context: An error occurred during SSL communication
- The upgrade of Ubuntu results in an error in the compilation of Android Jack [Two Method to Solve]
- [Solved] Any Softwares Install Error in Ubuntu: /usr/bin/dpkg returned an error code
- [Solved] Linux ECDSA key Error: Host key verification failed
- How to Fix Linux sub process /usr/bin/dpkg returned an error code (1)