执行 sudo yum install postgis2_94
后,不出意外会发生以下的错误。
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libcfitsio.so.2()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libdapclient.so.6()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libarmadillo.so.4()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libhdf5.so.8()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libfreexl.so.1()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libnetcdf.so.7()(64bit)
Error: Package: postgis2_94-2.1.5-1.rhel7.x86_64 (pgdg94)
Requires: hdf5
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libdapserver.so.7()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libdap.so.17()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libogdi.so.3()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libgeotiff.so.1.2()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libgta.so.0()(64bit)
Error: Package: gdal-libs-1.11.0-3.rhel7.x86_64 (pgdg94)
Requires: libCharLS.so.1()(64bit)
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
这个时候需要安装依赖库 sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
然后再执行 就会成功