Home:ALL Converter>Cannot install GDAL on docker container

Cannot install GDAL on docker container

Ask Time:2022-01-31T21:49:28         Author:Jake

Json Formatter

I need to install the latest version of gdal on another docker image. I cant run the osgeo/gdal container separately, because i need the python bindings.

When i run the next code in docker

FROM apache/airflow:2.2.3-python3.9
USER root

RUN apt install update
RUN apt-get install -y \
         build-essential \
         python-all-dev \
         python-is-python3 \
         libproj-dev \
         libpq-dev \
         libgeos-dev \
         wget


RUN wget http://download.osgeo.org/gdal/3.4.0/gdal-3.4.0.tar.gz
RUN tar xvfz gdal-3.4.0.tar.gz
WORKDIR ./gdal-3.4.0
RUN ./configure --with-python --with-pg --with-geos
RUN make
RUN make install
RUN ldconfig

I get the next error:

configure: error: PROJ 6 symbols not found
The command '/bin/bash -o pipefail -o errexit -o nounset -o nolog -c ./configure --with-python --with-pg --with-geos' returned a non-zero code: 1

Can someone please help.

Author:Jake,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/70927081/cannot-install-gdal-on-docker-container
yy