GDAL using CentOS 6

First of all we add the EPEL and ELGIS (Enterprise Linux GIS) repository to our repostory list.
rpm -Uvh
rpm -Uvh

It seems that EPEL broke the compatibility with GDAL.
Take a look at

Error: Package: gdal-1.9.2-4.el6.x86_64 (elgis)
Error: Package: gdal-libs-1.9.2-4.el6.x86_64 (elgis)

We need to exclude the armadillo package from the EPEL repository.
vi /etc/yum.repos.d/epel.repo

name=Extra Packages for Enterprise Linux 6 - $basearch

Let us just try to get the corret rpm package using this link provided by the JASMIN analysis platform.
yum install armadillo-3.800.2-1.el6.x86_64.rpm

It should recognize the blas dependency.

 armadillo   x86_64   3.800.2-1.el6     /armadillo-3.800.2-1.el6.x86_64    40 k
Installing for dependencies:
 blas        x86_64   3.2.1-4.el6       base                              321 k

After that yum install gdal should work like a charme.

We also need hdf5 package so we need to install it, too.
yum install

 hdf5-openmpi                i686      1.8.5.patch1-9.el6      epel       1.2 M
Installing for dependencies:
 glibc                       i686      2.12-1.149.el6_6.7      updates    4.3 M
 libgcc                      i686      4.4.7-11.el6            base       113 k
 libgfortran                 i686      4.4.7-11.el6            base       245 k
 libibumad                   i686      1.3.9-1.el6             base        57 k
 libibverbs                  i686      1.1.8-3.el6             base        53 k
 libnl                       i686      1.1.4-2.el6             base       124 k
 librdmacm                   i686          base        58 k
 libstdc++                   i686      4.4.7-11.el6            base       301 k
 libtool-ltdl                i686      2.2.6-15.5.el6          base        45 k
 lm_sensors-libs             i686      3.1.1-17.el6            base        37 k
 nss-softokn-freebl          i686      3.14.3-22.el6_6         updates    157 k
 openmpi                     i686      1.8.1-1.el6             base       2.9 M
 opensm-libs                 i686      3.3.17-1.el6            base        60 k
 papi                        i686      5.1.1-5.el6             base       485 k
 zlib                        i686      1.2.3-29.el6            base        73 k
Updating for dependencies:
 cpp                         x86_64    4.4.7-11.el6            base       3.7 M
 gcc                         x86_64    4.4.7-11.el6            base        10 M
 gcc-c++                     x86_64    4.4.7-11.el6            base       4.7 M
 gcc-gfortran                x86_64    4.4.7-11.el6            base       4.7 M
 glibc                       x86_64    2.12-1.149.el6_6.7      updates    3.8 M
 glibc-common                x86_64    2.12-1.149.el6_6.7      updates     14 M
 glibc-devel                 x86_64    2.12-1.149.el6_6.7      updates    983 k
 glibc-headers               x86_64    2.12-1.149.el6_6.7      updates    612 k
 libgcc                      x86_64    4.4.7-11.el6            base       102 k
 libgfortran                 x86_64    4.4.7-11.el6            base       267 k
 libgomp                     x86_64    4.4.7-11.el6            base       133 k
 libstdc++                   x86_64    4.4.7-11.el6            base       294 k
 libstdc++-devel             x86_64    4.4.7-11.el6            base       1.6 M
 nspr                        x86_64    4.10.6-1.el6_5          base       113 k
 nspr-devel                  x86_64    4.10.6-1.el6_5          base       111 k
 nss-softokn                 x86_64    3.14.3-22.el6_6         updates    262 k
 nss-softokn-devel           x86_64    3.14.3-22.el6_6         updates     14 k
 nss-softokn-freebl          x86_64    3.14.3-22.el6_6         updates    167 k
 nss-softokn-freebl-devel    x86_64    3.14.3-22.el6_6         updates    139 k
 nss-util                    x86_64        updates     66 k
 nss-util-devel              x86_64        updates     68 k

The should be located at /usr/lib64/openmpi/lib/

Ensure which libraries are missing by using which ogrinfo


and ldd /usr/bin/ogrinfo =>  (0x00007fff2a525000) => /usr/lib64/ (0x00007f3bdbe16000) => /usr/lib64/ (0x00007f3bdbc10000) => /usr/lib64/ (0x0000003950e00000) => /usr/lib64/ (0x00007f3bdba06000) => /usr/lib64/ (0x00007f3bdb7e2000) => /usr/lib64/ (0x00007f3bdb57a000) => /usr/lib64/ (0x00007f3bdb369000) => /lib64/ (0x0000003947200000) => /usr/lib64/ (0x00007f3bdadc7000) => /usr/lib64/ (0x0000003945200000) => /usr/lib64/ (0x00007f3bdaa82000) => not found => /usr/lib64/ (0x000000394ee00000) => /usr/lib64/ (0x0000003953e00000) => /usr/lib64/ (0x00007f3bda84e000) => /usr/lib64/ (0x0000003951a00000) => /usr/lib64/ (0x00007f3bda644000) => /usr/lib64/ (0x0000003947e00000) => /usr/lib64/ (0x00007f3bda28f000) => /usr/lib64/ (0x00007f3bda067000) => /usr/lib64/ (0x000000394de00000) => /lib64/ (0x0000003943a00000) => /lib64/ (0x0000003944600000) => /lib64/ (0x0000003943e00000) => /usr/lib64/ (0x00007f3bd9e37000) => /usr/lib64/ (0x00007f3bd9c2c000) => /usr/lib64/ (0x00007f3bd993b000) => /usr/lib64/ (0x00007f3bd945d000) => /usr/lib64/ (0x0000003958e00000) => /usr/lib64/ (0x00007f3bd9208000) => /usr/lib64/mysql/ (0x00007f3bd8e84000) => /lib64/ (0x0000003944200000) => /lib64/ (0x00007f3bd8c4c000) => /lib64/ (0x0000003954200000) => /usr/lib64/ (0x0000003952a00000) => /usr/lib64/ (0x0000003950a00000) => /usr/lib64/ (0x000000394fe00000) => /lib64/ (0x0000003943600000) => /lib64/ (0x00007f3bd8a34000) => /lib64/ (0x0000003943200000) => not found => /usr/lib64/atlas/ (0x00007f3bd8212000) => /usr/lib64/ (0x00007f3bd7fbb000) => /usr/lib64/atlas/ (0x00007f3bd7d9a000) => /usr/lib64/atlas/ (0x00007f3bd7b82000) => /usr/lib64/ (0x0000003950600000) => /usr/lib64/ (0x0000003947600000) => /usr/lib64/ (0x0000003948a00000) => /usr/lib64/ (0x00007f3bd7963000) => /usr/lib64/ (0x00007f3bd75cf000) => /usr/lib64/ (0x0000003951e00000) => not found => not found => /usr/lib64/ (0x0000003951600000) => /usr/lib64/ (0x0000003951200000) => /usr/lib64/ (0x0000003946600000) => /usr/lib64/ (0x00007f3bd7380000) => /lib64/ (0x0000003957200000) => /lib64/ (0x00007f3bd713b000) => /lib64/ (0x00007f3bd6ee7000)
	/lib64/ (0x0000003942e00000) => /usr/lib64/ (0x000000394e200000) => /lib64/ (0x00007f3bd6ce2000) => /usr/lib64/ (0x0000003957a00000) => /lib64/ (0x0000003958a00000) => /lib64/ (0x00007f3bd6a94000) => /lib64/ (0x000000394f600000) => /lib64/ (0x0000003950200000) => /lib64/ (0x000000394f200000) => /usr/lib64/ (0x0000003953600000) => /usr/lib64/ (0x0000003953200000) => /usr/lib64/ (0x0000003952e00000) => /usr/lib64/ (0x00007f3bd6865000) => /lib64/ (0x00007f3bd6661000) => /lib64/ (0x0000003952200000) => /lib64/ (0x0000003952600000) => /usr/lib64/ (0x0000003959200000) => /lib64/ (0x00007f3bd645c000) => /usr/lib64/ (0x00007f3bd616a000) => /usr/lib64/atlas/ (0x00007f3bd5f4a000) => /usr/lib64/atlas/ (0x00007f3bd58ee000) => /usr/lib64/ (0x0000003946200000) => /lib64/ (0x000000394fa00000) => /lib64/ (0x00007f3bd56ea000) => /lib64/ (0x0000003945600000) => /lib64/ (0x0000003956e00000) => /usr/lib64/ (0x0000003955600000) => /usr/lib64/ (0x0000003946a00000) => /lib64/ (0x0000003944e00000)

Copy the missing libraries to the lib64 folder.
cp /usr/lib64/openmpi/lib/ /usr/lib64
cp /usr/lib64/openmpi/lib/ /usr/lib64

Refresh the library cache by using ldconfig.


3 thoughts on “GDAL using CentOS 6

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s