0

I have been struggling to install PostGIS on my Redhat Linux based CentOS 7 (x64) machine and so far I am still running into problems. I used this step by step tutorial developed by Regina at PostgreSQL Online to install PostgreSQL 9.5 and PostGIS and everything seems to be fine until I started installing PostGIS. I am running into dependencies problems! After installing PostgreSQL 9.5, when I typed this command:

# sudo yum install postgis2_95 postgis2_95-client

I am getting these dependency errors:

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.crc.dk
* epel: ftp.crc.dk
* extras: ftp.crc.dk
* updates: ftp.crc.dk
Resolving Dependencies
--> Running transaction check
---> Package geos-devel.x86_64 0:3.5.0-1.rhel7 will be installed
--> Processing Dependency: geos = 3.5.0-1.rhel7 for package: geos-devel-3.5.0-1.rhel7.x86_64
--> Running transaction check
---> Package geos.x86_64 0:3.4.2-2.el7 will be updated
--> Processing Dependency: libgeos-3.4.2.so()(64bit) for package: grass-6.4.4-7.el7.x86_64
--> Processing Dependency: libgeos-3.4.2.so()(64bit) for package: grass-libs-6.4.4-7.el7.x86_64
---> Package geos.x86_64 0:3.5.0-1.rhel7 will be an update
--> Finished Dependency Resolution

Error: 
Package: grass-libs-6.4.4-7.el7.x86_64 (@epel)         
    Requires: libgeos-3.4.2.so()(64bit)
Removing: geos-3.4.2-2.el7.x86_64 (@epel)
libgeos-3.4.2.so()(64bit)          
Updated By: geos-3.5.0-1.rhel7.x86_64 (pgdg95)
    ~libgeos-3.5.0.so()(64bit)      
Available: geos-3.4.2-1.rhel7.x86_64 (pgdg94)        
libgeos-3.4.2.so()(64bit)
Available: geos-3.2.2-2.el6.x86_64 (elgis)        
~libgeos-3.2.2.so()(64bit)        
Available: geos-3.3.0-1.el6.x86_64 (elgis)        
~libgeos-3.3.0.so()(64bit)       
Available: geos-3.3.1-2.el6.x86_64 (elgis)       
~libgeos-3.3.1.so()(64bit)       
Available: geos-3.3.6-1_0.el6.x86_64 (elgis)           
~libgeos-3.3.6.so()(64bit)      
Available: geos-3.3.8-2.el6.x86_64 (elgis)             
~libgeos-3.3.8.so()(64bit)

Error: Package: grass-6.4.4-7.el7.x86_64 (@epel)           
Requires: libgeos-3.4.2.so()(64bit)          
Removing: geos-3.4.2-2.el7.x86_64 (@epel)
libgeos-3.4.2.so()(64bit)        
Updated By: geos-3.5.0-1.rhel7.x86_64 (pgdg95)             
~libgeos-3.5.0.so()(64bit)           
Available: geos-3.4.2-1.rhel7.x86_64 (pgdg94)
libgeos-3.4.2.so()(64bit)
Available: geos-3.2.2-2.el6.x86_64 (elgis)
~libgeos-3.2.2.so()(64bit)
Available: geos-3.3.0-1.el6.x86_64 (elgis)
~libgeos-3.3.0.so()(64bit)
Available: geos-3.3.1-2.el6.x86_64 (elgis)
~libgeos-3.3.1.so()(64bit)
Available: geos-3.3.6-1_0.el6.x86_64 (elgis)
~libgeos-3.3.6.so()(64bit)       
Available: geos-3.3.8-2.el6.x86_64 (elgis)
~libgeos-3.3.8.so()(64bit)
You could try --skip-broken to work around the problem.

Could anyone help me out to resolve these dependency issues or point out whether I am doing something wrong?

6
  • @HasanMustafa: I did install it by #yum -y install epel-release and I could see it typing #yum repolist
    – khajlk
    Sep 26, 2016 at 10:55
  • Try running this: sudo rpm -ivh http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm Sep 26, 2016 at 10:56
  • making changes depending on your postgres version Sep 26, 2016 at 10:57
  • @HasanMustafa: In the tutorial I mentioned, this was the first step which I did already. Running this command says: "package pgdg-centos95.9.5-2.noarch is already installed".
    – khajlk
    Sep 26, 2016 at 11:02
  • Your postgres was installed but you have problems installing postgis? Sep 26, 2016 at 11:03

2 Answers 2

3

You may also compile from source (so you do not mess rpms)

wget https://download.osgeo.org/postgis/source/postgis-2.4.4.tar.gz
tar xvzf postgis-2.4.4.tar.gz
cd postgis-2.4.4
./configure --with-pgconfig=/usr/pgsql-9.5/bin/pg_config
make
make install

Install the following dependencies before compiling:

yum install geos-devel.x86_64
yum install proj-devel.x86_64
yum install gdal-devel.x86_64
yum install libxml2-devel.x86_64
yum install json-c-devel.x86_64
1

Run this cmd

sudo yum install epel-release<br>
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E '%{rhel}').noarch.rpm

Check this link for more details

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.