Skip to content

ROS Ubuntu Bionic: public key is not available #32

@josiahls

Description

@josiahls

Problem

I am running on Ubuntu 18.04, and my docker build crashes at:

# setup keys and sources for official Gazebo and ROS debian packages
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 \
 && echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable bionic main" > /etc/apt/sources.list.d/gazebo-latest.list \
 && apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116 \
 && echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list

I get the message:

Step 5/27 : RUN apt-get update && apt-get install -q -y     ariac3     bash-completion     gazebo9     libgazebo9-dev     locales     psmisc     python-rosdep     python-rosinstall     python-vcstools     ros-melodic-robot-state-publisher     ros-melodic-ros-controllers     ros-melodic-ros-core     ros-melodic-ros-base     wget     && apt-get clean     && rm -rf /var/lib/apt/lists/*
 ---> Running in 7a8256d8841c
Get:1 http://packages.ros.org/ros/ubuntu bionic InRelease [4669 B]
Get:2 http://packages.osrfoundation.org/gazebo/ubuntu-stable bionic InRelease [4253 B]
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Err:1 http://packages.ros.org/ros/ubuntu bionic InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
Get:4 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
...
Reading package lists...
W: GPG error: http://packages.ros.org/ros/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F42ED6FBAB17C654
E: The repository 'http://packages.ros.org/ros/ubuntu bionic InRelease' is not signed.

Solution
I fixed this via:

# setup keys and sources for official Gazebo and ROS debian packages
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 \
 && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654 \
 && echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable bionic main" > /etc/apt/sources.list.d/gazebo-latest.list \
 && apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116 \
 && echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list

Let me know if doing a PR is a good idea. Not sure how many people had this issue, but my computer was pretty vanilla (1804, basic Docker version 19.03.5, build 633a0ea838).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions