I'm trying to install GDAL on my CentOS server to be able to make some GIS operations, but I'm having a lot of problems with MySQL that I can't figure out...

Here are the commands I tried, without success.

I tried a simple:

# yum install gdal
  • First, the GDAL version is 1.4 (the last released one is 1.9)
  • Then, I see in the dependencies list mysql. But I have mysql already installed, from another repository (remi), with a newer version than the one suggested by yum... Is it a problem of architecture (yum suggests i386)?
  • I risked a yes, but still impossible to install it!

Here's the error I have.

Transaction Check Error:
package mysql-5.5.28-1.el5.remi.x86_64 (which is newer than mysql-5.0.95-1.el5_7.1.i386) is already installed

Then, I tried to install it from sources with last version available (1.9.2). I downloaded the GDAL tar.gz, extracted the files and installed it like following:

# tar -xzf gdal-1.9.2.tar.gz
# ./configure --with-static-proj4=/usr/local/lib --with-threads --with-libtiff=internal --with-geotiff=internal --with-jpeg=internal --with-gif=internal --with-png=internal --with-libz=internal
# make
# make install

But during the make, I have some strange errors displaying, about RegisterOGRMySQL, that I can't understand:

chmod a+x gdal-config
/bin/sh /home/benjamin/gdal-1.9.2/libtool --mode=link    g++  gdalinfo.lo  /home/benjamin/gdal-1.9.2/libgdal.la  -o gdalinfo
libtool: link: g++ .libs/gdalinfo.o -o .libs/gdalinfo  /home/benjamin/gdal-1.9.2/.libs/libgdal.so -L/usr/local/lib/lib -L/usr/kerberos/lib64 -lproj -lsqlite3 /usr/lib64/libexpat.so -lpthread -lrt -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz  -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/lib64
/home/benjamin/gdal-1.9.2/.libs/libgdal.so: undefined reference to `RegisterOGRMySQL'
collect2: ld returned 1 exit status
make[1]: *** [gdalinfo] Error 1
make[1]: Leaving directory `/home/benjamin/gdal-1.9.2/apps'
make: *** [apps-target] Error 2

Has anyone a solution? Thanks a lot!


I resolved my problem, which was just an architecture problem actually (and it took me a whole week to figure it out...), using:

yum install gdal.x86_64

(and using elgis repository to have a more recent version)

|improve this answer|||||

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.