Install PostGIS on Amazon Linux

2k views Asked by At

I have installed PostgreSQL-9.6

And now I am trying to install PostGIS on Amazon linux but getting the following error:

[root@ip-172-31-38-64 ec2-user]# yum install postgis24_96

Loaded plugins: priorities, update-motd, upgrade-helper
23 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package postgis24_96.x86_64 0:2.4.4-1.rhel6 will be installed
...
--> Finished Dependency Resolution
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libdapserver.so.7()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libcfitsio.so.0()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libdap.so.11()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libdapclient.so.3()(64bit)
Error: Package: postgis24_96-2.4.4-1.rhel6.x86_64 (pgdg96)
           Requires: hdf5
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libfreexl.so.1()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libnetcdf.so.6()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libgta.so.0()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libarmadillo.so.4()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libxerces-c-3.0.so()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libhdf5.so.6()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libpoppler.so.5()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libspatialite.so.2()(64bit)
Error: Package: gdal-libs-1.9.2-8.rhel6.x86_64 (pgdg96)
           Requires: libCharLS.so.1()(64bit)

On postgresonline is recommended to install EPEL

yum -y install epel-release
OR
sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

But it does not help because EPEL is already installed on Amazon Linux.

Maybe somebody had already faced such issue? Or I should try switching to Ubuntu or some other distro?

1

There are 1 answers

0
xvronny On

I've soved this issue by manually adding the missing packages through package search engines, the way it was done in this install script. Added notes and findings on my own gist for later versions.