在设置镜像为阿里云后更新缓存或sudo apt update后均出现如下报错:
参考其他博客或其他搬运工的解决方案:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
结果未成功,如下图:
查阅了很多资料后找到如下网页:
apt update: signatures were invalid: F42ED6FBAB17C654 - ROS Answers: Open Source Q&A Forum
里面的第一条评论有解决方案:
ros1:
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
ros2:
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
亲测可用!