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

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

我是 Linux 新手,在成功安装 PostgreSQL 9.1 后尝试安装 PostGIS2。该机器运行的是 CentOS 6.3 并安装了 cPanel。

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

我应该如何解决这个依赖问题并安装 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')

答案1

大多数必需的缺失库似乎都在 EPEL 存储库中。我不知道 PostgreSQL 为什么要单独提供它们,而且还是旧版本。

除此之外,您的 CentOS 基础存储库似乎可能存在问题。例如,perl-DBD-Pg位于基础存储库中,但您的 yum 副本由于某种原因找不到它。我猜可能是 cPanel 破坏了它们以及它破坏的所有其他东西。

因此,我会先安装 EPEL 存储库,然后检查其他存储库,以确保您确实获得了 CentOS 基础和更新。之后,我会查看哪些地方仍存在问题,然后从那里开始。

答案2

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

帮我修好了...

相关内容