我正在尝试在Ubuntu18.04上安装ROS2。
下面的命令给出了没有公钥的错误。
sudo apt update && sudo apt install curl gnupg2 lsb-release错误:
Hit:1 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu bionic InRelease
Hit:2 http://de.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease
Get:4 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:6 http://packages.ros.org/ros2/ubuntu bionic InRelease [2,565 B]
Err:6 http://packages.ros.org/ros2/ubuntu bionic InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5523BAEEB01FA116
Reading package lists... Done
W: GPG error: http://packages.ros.org/ros2/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5523BAEEB01FA116
E: The repository 'http://packages.ros.org/ros2/ubuntu bionic 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.我尝试了以下方法来获取密钥:
sudo apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 5523BAEEB01FA116和
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5523BAEEB01FA116和y-ppa-manager (“尝试导入所有丢失的GPG密钥”)
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get install y-ppa-manager
y-ppa-manager上述所有方法都会产生以下错误
gpg: keyserver receive failed: No keyserver available我在Windows7主机上使用虚拟机运行Ubuntu 18.04。
如何使用keyserver?
发布于 2019-06-18 16:11:43
您可以从用于每晚构建osrf/ros2Docker镜像的Docker文件中获取当前工作密钥的副本:https://hub.docker.com/r/osrf/ros2/dockerfile
# setup ros2 keys
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654虽然这不是一个面向未来的解决方案,因为我最初对ROS2水晶使用了不同的密钥,然后该密钥突然停止工作(我们也有自己的常规构建),我得到了与您相同的错误。结果是我不得不用新的密钥更新我们的构建。
我认为更好的解决方案是使用预先构建的ROS2环境作为Docker镜像。这样一来,密钥就会在更新时被更新。
docker pull osrf/ros2:nightlyhttps://stackoverflow.com/questions/56062837
复制相似问题