Search code examples
dockerros

Undetermined error (109) in docker apt-get for ros-pcl


I am trying to get some ros packages in docker. I have a command like:

RUN apt-get update && cat /srv/hm_ros.system | xargs apt-get install -y --no-install-recommends  && \
rm -rf /var/lib/apt/lists/* && apt-get clean

where hm_ros.system is a file containing:

python3-rosinstall 
ros-noetic-fkie-multimaster 
ros-noetic-mavlink 
ros-noetic-pcl-ros 
ros-noetic-robot-state-publisher 
ros-noetic-ros-base
ros-noetic-rosbridge-suite 
ros-noetic-rosserial 
ros-noetic-tf 
ros-noetic-unique-id
ros-noetic-urdf 
ros-noetic-xacro

But i always get the error:

E: Failed to fetch http://packages.ros.org/ros/ubuntu/po... Undetermined Error [IP: 64.50.236.52 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

The other packages seem to be found succsessfully. A note, prior to this I have:

RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends lsb-release gnupg2 && \
DEBIAN_FRONTEND="noninteractive" apt-get -y --no-install-recommends install tzdata \
&& apt-get clean && rm -rf /var/lib/apt/lists/* 

RUN add-apt-repository universe && add-apt-repository multiverse
RUN echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" >> /etc/apt/sources.list.d/ros-latest.list && \
apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

Of further interest, if I install it stand-alone, ie.:

RUN apt-get update && apt-get install -y --no-install-recommends ros-noetic-pcl-ros && \
rm -rf /var/lib/apt/lists/* && apt-get clean

Then this problem does not occur, and even though there are almost 1gb of dependencies. Any ideas why this can occur?


Solution

  • Although I still do not know the cause of this, it can be solved by using the following install command:

    sudo apt-get \
        -o Acquire::BrokenProxy="true" \
        -o Acquire::http::No-Cache="true" \ 
        -o Acquire::http::Pipeline-Depth="0" \ 
    install -y \
        package ...