尝试从容器中运行curl但遇到此错误,我在安装curl后已经将其复制到了容器中,所以不确定我丢失了什么
FROM debian:stretch
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
curl \
make \
wget \
unzip \
bash \
jq \
libssl1.0-dev \
libasl-dev \
libsasl2-dev \
pkg-config \
libsystemd-dev \
zlib1g-dev
COPY /lib/x86_64-linux-gnu/libcom_err.so* /lib/x64_64-linux-gnu/`
docker run -it --env LD_LIBRARY_PATH="/usr/lib/x64_64-linux-gnu/" myimage .
#curl
curl: error while loading shared libraries: libcom_err.so.2: cannot open shared object file: No such file or directory
答案 0 :(得分:1)
与其尝试复制它,不如将其添加到apt install
阶段,然后让我们弄清楚如何获取它并解决它的依赖性:
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
curl \
make \
wget \
unzip \
bash \
jq \
libcomerr2 \
libssl1.0-dev \
libasl-dev \
libsasl2-dev \
pkg-config \
libsystemd-dev \
zlib1g-dev