Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR keyserver 'hkp://keyserver.ubuntu.com:80' #66

Open
alex77272 opened this issue Feb 8, 2024 · 1 comment
Open

ERROR keyserver 'hkp://keyserver.ubuntu.com:80' #66

alex77272 opened this issue Feb 8, 2024 · 1 comment

Comments

@alex77272
Copy link

Hello,

I just can't build the docker and always get the following error:

0.255 Executing: /tmp/apt-key-gpghome.h5zo4KlEsf/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
0.457 gpg: CRC error; 14C720 - 6C9712
0.457 gpg: read_block: read error: Invalid keyring
0.457 gpg: Total number processed: 0

Anyone has a tip how I can solve it?

Tried to build on a Mac and also on Ubuntu 22.04..

@875353581
Copy link

for me

  1. first change DockerFile to the following:
FROM dorowu/ubuntu-desktop-lxde-vnc:focal
LABEL maintainer="Unity Robotics <unity-robotics@unity3d.com>"

ENV DEBIAN_FRONTEND noninteractive
ENV DEV_NAME=rosdev
ENV ROS_DISTRO=galactic
ENV GROUP_NAME=ros
ENV WS_NAME=colcon_ws

RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -

RUN echo "Set disable_coredump false" >> /etc/sudo.conf
RUN apt-get update -q && \
    apt-get upgrade -yq && \
    apt-get install -yq \
        wget \
        curl \
        git \
        build-essential \
        vim \
        sudo \
        gnupg2 \
        lsb-release \
        locales \
        bash-completion \
        tzdata \
        gosu \
        python3-argcomplete \
        python3-pip \
    && rm -rf /var/lib/apt/lists/*

# Install the immutable components BEFORE we copy in build context stuff to keep the rebuild process manageable
RUN curl http://repo.ros2.org/repos.key | sudo apt-key add -
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
    echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > \
        /etc/apt/sources.list.d/ros2-latest.list && \
    apt-get update -q && \
    apt-get install -y --no-install-recommends \
      ros-${ROS_DISTRO}-desktop \
      python3-rosdep \
      python3-colcon-common-extensions \
      python3-vcstool \
      ros-galactic-navigation2 \
      ros-galactic-nav2-bringup \
    && rm -rf /var/lib/apt/lists/* && rm /etc/apt/sources.list.d/ros2-latest.list

RUN useradd --create-home --home-dir /home/${DEV_NAME} --shell /bin/bash --user-group --groups adm,sudo ${DEV_NAME} && \
    echo "$DEV_NAME:$DEV_NAME" | chpasswd && \
    echo "$DEV_NAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
COPY --chown=${DEV_NAME} colcon_ws /home/${DEV_NAME}/colcon_ws
COPY ros2-setup.bash /bin/ros2-setup.bash
# Doing a second fetch of sources & apt-get update here, because these ones depend on the state of the build context
# in our repo
RUN curl http://repo.ros2.org/repos.key | sudo apt-key add -
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
    echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > \
        /etc/apt/sources.list.d/ros2-latest.list && \
    apt-get update -q && \
    rosdep init && \
    chmod +x /bin/ros2-setup.bash && \
    gosu ${DEV_NAME} /bin/ros2-setup.bash && \
    runuser -u ${DEV_NAME} ros2-setup.bash && \
    rm /bin/ros2-setup.bash && \
    rm -rf /var/lib/apt/lists/* && rm /etc/apt/sources.list.d/ros2-latest.list

RUN echo ". /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/${DEV_NAME}/.bashrc && \
    echo ". /home/${DEV_NAME}/${WS_NAME}/install/local_setup.bash" >> /home/${DEV_NAME}/.bashrc

ENV TURTLEBOT3_MODEL=waffle_pi

# To bring up tb3 simulation example (from https://navigation.ros.org/tutorials/docs/navigation2_with_slam.html)
# cd catkin_ws && source install/setup.bash && ros2 launch nav2_bringup tb3_simulation_launch.py slam:=True

# Informs the environment that the default user is not root, but instead DEV_NAME
ENV USER ${DEV_NAME}
  1. if encounter problem like " Failed to connect to raw.githubusercontent.com ", ensure your local network can visit https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc, otherwise your have to modify your local network, like hosts or VPN, for me, i use VPN and change hosts at docker build command:
    docker build --add-host=raw.githubusercontent.com:185.199.110.133 -t unity-robotic:nav2-slam-example ./
    change the host ip depends on your network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants