【问题标题】:"gpg: keyserver receive failed: connection refused" with ROS packages带有 ROS 包的“gpg:密钥服务器接收失败:连接被拒绝”
【发布时间】:2019-05-09 15:27:57
【问题描述】:

我正在尝试在 Ubuntu 18.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

我在 Windows 7 主机上使用虚拟机运行 Ubuntu 18.04。

如何使用密钥服务器?

【问题讨论】:

    标签: ubuntu-18.04 apt ros2 keyserver


    【解决方案1】:

    您可以从用于每晚构建 osrf/ros2 Docker 映像的 Dockerfile 中获取当前工作密钥的副本: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 Crystal 使用了不同的密钥,然后该密钥突然停止工作(我们也有自己的常规构建),我得到了和你一样的错误。事实证明,我必须使用新密钥更新我们的构建。

    我认为一个更好的解决方案是使用预先构建的 ROS2 环境作为 Docker 映像。这样,密钥会在更新时得到更新。

    docker pull osrf/ros2:nightly
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-21
      • 2019-08-22
      • 1970-01-01
      • 2014-01-07
      • 1970-01-01
      • 1970-01-01
      • 2019-02-18
      • 1970-01-01
      相关资源
      最近更新 更多