我在 docker 上运行以下命令并收到以下错误。我该如何修复此问题?
FROM compiler-common AS compi
ENV DEBIAN_FRONTEND=nonintera
RUN apt-get install -y --no-i
git-core \
checkinstall \
g++ \
make \
tar \
curl \
wget \
build-essential \
cmake \
autotools-dev \
automake \
autogen \
ca-certificates
RUN cd ~ \
&& git clone --single-branch
&& cd libgeotiff \
&& ./autogen.sh \
&& ./configure \
&& make dist \
&& tar xvzf libgeotiff*.tar.g
&& cd libgeotiff* \
&& mkdir build_autoconf \
&& cd build_autoconf \
&& CFLAGS="-Wall -Wextra -Wer
&& make -j3 \
&& make check \
&& cd .. \
&& mkdir build_cmake \
&& cd build_cmake \
&& cd ../.. \
&& make -j3 \
&& apt --fix-broken install \
错误:
Cloning into 'libgeotiff'...
/bin/sh: 1: ./autogen.sh: not found
ERROR: Service 'map' failed to build: The command '/bin/sh -c cd ~ && git clone --single-branch https://github.com/OSGeo/libgeotiff.git --depth 1 && cd libgeotiff && ./autogen.sh && ./configure && make dist && tar xvzf libgeotiff*.tar.gz && cd libgeotiff* && mkdir build_autoconf && cd build_autoconf && CFLAGS="-Wall -Wextra -Werror" ../configure && make -j3 && make check && cd .. && mkdir build_cmake && cd build_cmake && cd ../.. && make -j3 && apt --fix-broken install FROM ubuntu:20.04 AS final-base' returned a non-zero code: 127
答案1
您位于错误的目录中。您正在克隆此存储库:https://github.com/OSGeo/libgeotiff/tree/master/libgeotiff。正如您在日志中看到的,它正在被克隆到~/libgeotiff
,其内容如下:
$ ls libgeotiff/
geotiff libgeotiff README.md
但是,你的autoconf.sh
文件位于子目錄称为:~/libgeotiff
libgeotiff
$ ls libgeotiff/libgeotiff/*sh
libgeotiff/libgeotiff/autogen.sh libgeotiff/libgeotiff/install-sh
因此您需要将cd
命令更改为:
cd libgeotiff/libgeotiff &&
./autogen.sh &&
./configure