1

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')
Nyxynyx
  • 1,459
  • 11
  • 39
  • 49

2 Answers2

1

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.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • EPEL fixed the first series of errors due to gdal! However, there is a problem installing `perl-DBD-Pg` as shown in updated post. I remember having many problems with perl dependencies when cpanel is installed. How should I proceed from here? – Nyxynyx Sep 10 '12 at 02:09
  • Pastebin the contents of your `CentOS-Base.repo`. – Michael Hampton Sep 10 '12 at 02:11
  • `http://pastebin.com/EEMhPMS4` – Nyxynyx Sep 10 '12 at 02:13
  • That looks normal. Try `yum clean all` and then try installing again. If it doesn't work, look at all your _other_ repos. – Michael Hampton Sep 10 '12 at 02:16
  • Same problem after `yum clean all`. The repos in `/etc/yum.repos.d/` are `CentOS-Base.repo`, `CentOS-Media.repo`, `epel.repo`, `pgdg-91-centos.repo`, `CentOS-Debuginfo.repo`, `CentOS-Vault.repo`, `epel-testing.repo`. Which repo should I look at? – Nyxynyx Sep 10 '12 at 02:27
  • Honestly, if this were my box, I would start over from scratch, and this time _not install cPanel_. – Michael Hampton Sep 10 '12 at 02:35
  • cPanel came with the VPS when I got it provisioned. I guess I should try installing PostGIS by compiling the source now. Not sure if installing by compiling from source will give the same error... – Nyxynyx Sep 10 '12 at 02:38
1
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

Fixed it for me...

Kevin Parker
  • 144
  • 5