Dependency issue installing PostGIS on CentOs 6.3

Nyxynyx asked:

I am new to linux and is trying to install PostGIS2 after successfully installing PostgreSQL 9.1. The machine is running CentOS 6.3 and has cPanel installed.

Problem: When I tried installing PostGIS using yum: yum install postgis2_91 postgis2_91-utils, I get the dependency error below.

How should I solve this dependency problem and install PostGIS? Thank you so much!

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

Update

An error still remains:

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

My answer:


Most of the necessary missing libraries seem to be in the EPEL repository. I have no idea why PostgreSQL would want to provide them separately, and older versions at that.

Beyond that, it seems something is probably wrong with your CentOS base repositories. For instance, perl-DBD-Pg is located in the base repo, but your copy of yum didn’t find it for some reason. My guess would be that cPanel probably broke them, along with all the other stuff it breaks.

So, I would start by installing the EPEL repository and check the other repositories to make sure you’re actually getting CentOS base and updates. After that, I’d see what is still broken, and go from there.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.