nditech/apollo

Apollo creation fails with error

blynchNDI opened this issue · 3 comments

I've tried spinning up Apollo 3 from scratch for the first time in a couple weeks (as opposed to updating from an image), and found that it seems to fail for me. I checked this both locally and on a server and seemed to get issues both times. The final error output is below - I can provide more detailed logs if need be. I've just been setting up the settings.ini file and then running docker-compose up -d

configure: error: could not find libproj - you may need to specify the directory of a PROJ.4 installation using --with-projdir
ERROR: Service 'postgres' failed to build: The command '/bin/sh -c set -ex         && apk add --no-cache --virtual .fetch-deps         ca-certificates         openssl         tar         && wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/$POSTGIS_VERSION.tar.gz"     && echo "$POSTGIS_SHA256 *postgis.tar.gz" | sha256sum -c -     && mkdir -p /usr/src/postgis     && tar         --extract         --file postgis.tar.gz         --directory /usr/src/postgis         --strip-components 1     && rm postgis.tar.gz         && apk add --no-cache --virtual .build-deps         autoconf         automake         g++         json-c-dev         libtool         libxml2-dev         make         perl         && apk add --no-cache --virtual .build-deps-edge         --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing         --repository http://dl-cdn.alpinelinux.org/alpine/edge/main         gdal-dev         geos-dev         proj-dev         protobuf-c-dev     && cd /usr/src/postgis     && ./autogen.sh     && ./configure     && make     && make install     && apk add --no-cache --virtual .postgis-rundeps         json-c     && apk add --no-cache --virtual .postgis-rundeps-edge         --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing         --repository http://dl-cdn.alpinelinux.org/alpine/edge/main         geos         gdal         proj         protobuf-c     && cd /     && rm -rf /usr/src/postgis     && apk del .fetch-deps .build-deps .build-deps-edge' returned a non-zero code: 1

Screenshot from 2019-10-15 10-38-21

Including the screenshot since it's easier to read

Seems the Alpine Linux package maintainers upgraded proj4 to 6.X (and removed older versions), which the current version (2.5.2) of PostGIS does not support. From what I can see, a fix would be to download and compile proj4 4.9.5 and use it to build PostGIS. Or upgrade the PostGIS version to 3.0.

See this and the linked issues therein for more info.

#638 seems to indeed be successful in fixing this - I tried doing a fresh spin up of the application from a commit before this fix and confirmed that the spin up failed, then updated the code to after this fix and was able to successfully spin up a fresh instance