ROS2 humble ubuntu 22.04 安装过程中,执行 sudo apt update 报
Err:6 http://packages.ros.org/ros2/ubuntu jammy InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
分析发现是前面步骤中的下述命令没有成功执行:
Now add the ROS 2 GPG key with apt.
sudo apt update && sudo apt install curl -y sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 5009 ms: Connection refused
cd 进入目录 /usr/share/keyrings/ ,也没生成 ros-archive-keyring.gpg 文件。
尝试用浏览器直接访问地址 https://raw.githubusercontent.com/ros/rosdistro/master/ros.key,发现可以直接下载 ros.key 文件
临时解决方案:
进入用浏览器下载好的 ros.key 所在目录后,用以下命令手动把 ros.key 复制到目标目录:
sudo mv ros.key /usr/share/keyrings/ros-archive-keyring.gpg
然后就可以成功执行
sudo apt update
至于为啥用 curl 无法访问 https://raw.githubusercontent.com/ros/rosdistro/master/ros.key,原因还没查到,希望高手可以告知。