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.
- ros2 apt-get install error: E: Failed to fetch http://packages.ros.org…
- Linux apt-get update Error: Error in `appstreamcli‘: double free or corruption … Aborted (core dumped)
- How to Fix Linux sub process /usr/bin/dpkg returned an error code (1)
- How to Solve Ubuntu “Failed to fetch” Error
- Ubuntu found an error during apt operation [How to Solve]
- Ubuntu Run Error: not syncing : VFS: Unable to mount root
- [Solved] configure: error: no acceptable C compiler found in $PATH
- [Solved] Linux installation pillow error: ValueError: jpeg is required unless explicitly disabled using –disable-jpeg, aborting
- [Solved] ERROR: error loading sources list: The read operation timed out
- When installing software in Ubuntu, it prompts: E: You don’t have enough free space in /var/cache/apt/archives/.
- Linux Ubuntu ImportError: Libtk8.5.so: cannot open shared object file:No such file Install tkinter Library
- [Solved] Python Import mmcv Warning: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- Ubuntu sub process/usr/bin/dpkg returned an error code (1) solution
- Fatal error: sys/cdefs.h: No such file or directory
- NVIDIA SMI error after Ubuntu 20.04 restart [How to Solve]
- linux Ubuntu Error: No command ‘setenv‘ found
- How to Use Apt get Command Under Mac OSX
- U-boot NFS download file error: loading: * * * error: File lookup fail solution
- Ubuntu18.04 Compile A40i SDK Error: misc/create_inode.c:395:18: error: conflicting types for ‘copy_file_range‘
- [Solved] Ubuntu20.04 Error: “Failed to install the following Android SDK packages as some licences have not..“error