在CentOs 6.3上安装PostGIS的依赖性问题

我是linux新手,在成功安装PostgreSQL 9.1之后试图安装PostGIS2。 机器正在运行CentOS 6.3并安装了cPanel。

问题:当我尝试使用yumyum install postgis2_91 postgis2_91-utils安装PostGIS时,出现下面的依赖关系错误。

我应该如何解决这个依赖问题并安装PostGIS? 非常感谢!

 --> Finished Dependency Resolution Error: Package: postgis2_91-utils-2.0.1-1.rhel6.i686 (pgdg91) Requires: perl-DBD-Pg Error: Package: gdal-1.7.2-1.el6.i686 (pgdg91) Requires: libdapserver.so.7 Error: Package: gdal-1.7.2-1.el6.i686 (pgdg91) Requires: libdap.so.11 Error: Package: gdal-1.7.2-1.el6.i686 (pgdg91) Requires: libgeotiff.so.1.2 Error: Package: gdal-1.7.2-1.el6.i686 (pgdg91) Requires: libnetcdf.so.6 Error: Package: gdal-1.7.2-1.el6.i686 (pgdg91) Requires: libdapclient.so.3 Error: Package: gdal-1.7.2-1.el6.i686 (pgdg91) Requires: libhdf5.so.6 Error: Package: gdal-1.7.2-1.el6.i686 (pgdg91) Requires: librx.so.0 Error: Package: gdal-1.7.2-1.el6.i686 (pgdg91) Requires: libogdi.so.3 Error: Package: gdal-1.7.2-1.el6.i686 (pgdg91) Requires: libcfitsio.so.0 You could try using --skip-broken to work around the problem ** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows: bandmin-1.6.1-5.noarch has missing requires of perl(bandmin.conf) bandmin-1.6.1-5.noarch has missing requires of perl(bmversion.pl) bandmin-1.6.1-5.noarch has missing requires of perl(services.conf) exim-4.77-1.i386 has missing requires of perl(SafeFile) frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0 sendmail-cf-8.14.4-8.el6.noarch has missing requires of sendmail = ('0', '8.14.4', '8.el6') 

更新

错误仍然存​​在:

 Error: Package: postgis2_91-utils-2.0.1-1.rhel6.i686 (pgdg91) Requires: perl-DBD-Pg You could try using --skip-broken to work around the problem ** Found 6 pre-existing rpmdb problem(s), 'yum check' output follows: bandmin-1.6.1-5.noarch has missing requires of perl(bandmin.conf) bandmin-1.6.1-5.noarch has missing requires of perl(bmversion.pl) bandmin-1.6.1-5.noarch has missing requires of perl(services.conf) exim-4.77-1.i386 has missing requires of perl(SafeFile) frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0 sendmail-cf-8.14.4-8.el6.noarch has missing requires of sendmail = ('0', '8.14.4', '8.el6') 

大部分缺失的库似乎都在EPEL库中。 我不知道为什么PostgreSQL会希望单独提供它们,而旧版本则是这样。

除此之外,CentOS基础知识库似乎有些问题。 例如, perl-DBD-Pg位于基本仓库中,但是yum的副本由于某种原因没有find它。 我的猜测是,cPanel可能会破坏它们,以及所有其他的东西。

因此,我将首先安装EPEL存储库并检查其他存储库,以确保您实际获得CentOS基础和更新。 之后,我会看到还有什么坏的,然后从那里出发。

 rpm -Uvh http://elgis.argeo.org/repos/6/elgis-release-6-6_0.noarch.rpm rpm -Uvh http://fedora-epel.mirror.iweb.com/6/i386/epel-release-6-8.noarch.rpm 

为我修好了…