编译postgis需要安装Proj4、GEOS、GDAL、SFCGAL
gcc:11.1.0
postgis:2.5.2
wget http://download.osgeo.org/postgis/source/postgis-2.5.2.tar.gz
postgresql:10.21
GEOS:3.6.1
wget http://download.osgeo.org/geos/geos-3.6.1.tar.bz2
Proj4:4.9.3
wget http://download.osgeo.org/proj/proj-4.9.3.tar.gz
GDAL:2.1.2
wget http://download.osgeo.org/gdal/2.1.2/gdal-2.1.2.tar.gz
SFCGAL:1.3.1
./configure --prefix=/usr/proj
make
make install
./configure --prefix=/usr/geos
make
make install
./configure --prefix=/usr/gdal
make
make install
安装SFCGAL需要CGAL支持,这次使用rpm安装CGAL和SFCGAL
https://pkgs.org/search/https://pkgs.org/search/?q=cgal 下载
CGAL-4.7-1.rhel7.1.aarch64.rpm
CGAL-devel-4.7-1.rhel7.1.aarch64.rpm
SFCGAL-1.3.1-4.rhel7.aarch64.rpm
SFCGAL-devel-1.3.1-4.rhel7.aarch64.rpm
SFCGAL-libs-1.3.1-4.rhel7.aarch64.rpm
安装libxml2、zlib、perl
./configure --with-pgconfig=/usr/bin/pg_config --with-geosconfig=/usr/geos/bin/geos-config --with-gdalconfig=/usr/gdal/bin/gdal-config --with-projdir=/usr/proj --with-sfcgal=/usr/bin/sfcgal-config --prefix=/usr/postgis/
make
make install