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')
2
  • Where did you get these packages? – Michael Hampton Sep 10 '12 at 1:51
  • I got them from rpm -Uvh http://yum.postgresql.org/9.1/redhat/rhel-6-i386/pgdg-centos91-9.1-4.noarch.rpm and did a exclude=postgresql* in /etc/yum.repos.d/CentOS-Base.repo – Nyxynyx Sep 10 '12 at 1:52
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.

7
  • 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 2:09
  • Pastebin the contents of your CentOS-Base.repo. – Michael Hampton Sep 10 '12 at 2:11
  • http://pastebin.com/EEMhPMS4 – Nyxynyx Sep 10 '12 at 2: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 2: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 2:27
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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.