在Amazon Linux上安装PostGIS

时间:2018-05-19 17:09:47

标签: postgis postgis-installation

我已经安装了PostgreSQL-9.6

现在我正在尝试在Amazon Linux上安装PostGIS,但收到以下错误:

[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)

建议在postgresonline安装EPEL

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

但它没有帮助,因为EPEL已经安装在Amazon Linux上。

也许有人已经遇到过这样的问题? 或者我应该尝试切换到Ubuntu或其他一些发行版?

1 个答案:

答案 0 :(得分:0)

我通过在软件包搜索引擎中手动添加缺少的软件包(在此qpdf中完成的方法)解决了这个问题。在我的install script中为以后的版本添加了注释和发现。