osrf / docker_images

A repository to hold definitions of docker images maintained by OSRF
Apache License 2.0
578 stars 172 forks source link

Docker Build Fails due to missing tf-transformations package #713

Closed nexuschild closed 10 months ago

nexuschild commented 10 months ago
FROM ros:humble-ros-base-jammy
ARG USERNAME=root
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
    && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
    #
    # [Optional] Add sudo support. Omit if you don't need to install software after connecting.
    && apt-get update \
    && apt-get install -y sudo \
    && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
    && chmod 0440 /etc/sudoers.d/$USERNAME
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y python3-pip wget nano tmux
RUN rosdep update
ENV SHELL /bin/bash

# ********************************************************
# * Anything else you want to do like clean up goes here *
# ********************************************************

# [Optional] Set the default user. Omit if you want to keep the default as root.
USER $USERNAME
CMD ["/bin/bash"]
Err:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-tf-transformations amd64 1.0.1-3jammy.20231117.163645
  404  Not Found [IP: 2600:3404:200:237::2 80]
E: Failed to fetch http://packages.ros.org/ros2/ubuntu/pool/main/r/ros-humble-tf-transformations/ros-humble-tf-transformations_1.0.1-3jammy.20231117.163645_amd64.deb  404  Not Found [IP: 2600:3404:200:237::2 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ERROR: the following rosdeps failed to install
  apt: command [apt-get install -y ros-humble-tf-transformations] failed
[70176 ms] postCreateCommand failed with exit code 1. Skipping any further user-provided commands.
Done. Press any key to close the terminal.
mikaelarguedas commented 10 months ago

Looks like you are trying to fetch a version of the package that doesnt exist anymore 1.0.1-3jammy.20231117.163645 The version currently in the ROS repopsitories is: 1.0.1-3jammy.20240125.200720

Maybe you were unlucky and hit the repo just when it was updated, otherwise in general (maybe not the source of the issue here) consider running apt-get update in the same run statement as your installation as per docker best practices: https://docs.docker.com/develop/develop-images/instructions/#apt-get

nexuschild commented 10 months ago

Yes, this works. I thought the apt-get was running within a docker, which was not affected by the apt-get of my system. Interesting. Thank you so much for your help.

mikaelarguedas commented 10 months ago

I thought the apt-get was running within a docker, which was not affected by the apt-get of my system.

Yes that is the case the 2 are totally independant

nexuschild commented 10 months ago

Then, I was just unlucky. :D