Compiling / installing GDAL 2.2.x with MBTILES driver on REDHAT 7

Synbitz Prowduczions asked:

I am trying to get GDAL with MBTiles Driver working on a RHEL7 instance.

I have downloaded the source code and am trying to compile it with MBTILES.
This is the first time I’m compiling something myself from source code.
For some reason the parameters I’m passing do not work.

I use this procedure :

cd /tmp
tar zxvf gdal-2.2.1.tar.gz 
cd gdal-2.2.1/
./configure --prefix=/usr --libdir=/usr/lib64 --with-sqlite3=yes --with-spatialite=yes --with-ogr=yes  --with-curl=/usr/bin/curl-config
make -j4
sudo make install

When I submit the configure line, I am getting back some output about what is going to be enabled and what not. While I have set –with-sqlite3 option and others, they do not get added to the build I am wondering why I have installed dependencies libspacialite, sqlite3, geos …

after ./configure is done processing I am getting this output that states sqlite3 and spatialite is not going to be added ???

GDAL is now configured for x86_64-pc-linux-gnu

  Installation directory:    /usr
  C++ compiler:              g++ -std=gnu++11 -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2
  C++11 support:             yes

  LIBTOOL support:           yes

  LIBZ support:              external
  LIBLZMA support:           no
  cryptopp support:          no
  GRASS support:             no
  CFITSIO support:           no
  PCRaster support:          internal
  LIBPNG support:            internal
  DDS support:               no
  GTA support:               no
  LIBTIFF support:           internal (BigTIFF=yes)
  LIBGEOTIFF support:        internal
  LIBJPEG support:           internal
  12 bit JPEG:               yes
  12 bit JPEG-in-TIFF:       yes
  LIBGIF support:            internal
  OGDI support:              no
  HDF4 support:              no
  HDF5 support:              no
  Kea support:               no
  NetCDF support:            no
  Kakadu support:            no
  JasPer support:            no
  OpenJPEG support:          no
  ECW support:               no
  MrSID support:             no
  MrSID/MG4 Lidar support:   no
  JP2Lura support:           no
  MSG support:               no
  GRIB support:              yes
  EPSILON support:           no
  WebP support:              no
  cURL support (wms/wcs/...):yes
  PostgreSQL support:        no
  MRF support:               yes
  MySQL support:             no
  Ingres support:            no
  Xerces-C support:          no
  NAS support:               no
  Expat support:             no
  libxml2 support:           no
  Google libkml support:     no
  ODBC support:              no
  PGeo support:              no
  FGDB support:              no
  MDB support:               no
  PCIDSK support:            internal
  OCI support:               no
  GEORASTER support:         no
  SDE support:               no
  Rasdaman support:          no
  DODS support:              no
  SQLite support:            no
  PCRE support:              yes
  SpatiaLite support:        no
  RasterLite2 support:       no
  Teigha (DWG and DGNv8):    no
  INFORMIX DataBlade support:no
  GEOS support:              no
  SFCGAL support:            no
  QHull support:             internal
  Poppler support:           no
  Podofo support:            no
  PDFium support:            no
  OpenCL support:            no
  Armadillo support:         no
  FreeXL support:            no
  SOSI support:              no
  MongoDB support:           no

if anyone has any idea how I can get MBTiles driver included ?

My answer:

To compile programs from source code, on RHEL systems, you need to install their corresponding -devel packages. For instance, for SQLite support, you need to install sqlite-devel.

Name        : sqlite-devel
Arch        : x86_64
Version     : 3.7.17
Release     : 8.el7
Size        : 104 k
Repo        : rhel-7-server-rpms/7Server/x86_64
Summary     : Development tools for the sqlite3 embeddable SQL database engine
URL         :
License     : Public Domain
Description : This package contains the header files and development
            : documentation for sqlite. If you like to develop programs using
            : sqlite, you will need to install sqlite-devel.

The same is true for each additional feature not present in the output there. Some time spent with yum search should turn up -devel packages for most of them. But you will need to enable the optional channel and EPEL to get some of them.

Also keep in mind that an older version of GDAL is in EPEL, so if that is sufficient for your use, then perhaps you don’t need to compile it yourself after all.

Name        : gdal
Arch        : x86_64
Version     : 1.11.4
Release     : 3.el7
Size        : 276 k
Repo        : epel/x86_64
Summary     : GIS file format library
URL         :
License     : MIT
Description : Geospatial Data Abstraction Library (GDAL/OGR) is a cross platform
            : C++ translator library for raster and vector geospatial data
            : formats. As a library, it presents a single abstract data model to
            : the calling application for all supported formats. It also comes
            : with a variety of useful commandline utilities for data
            : translation and processing.
            : It provides the primary data access engine for many applications.
            : GDAL/OGR is the most widely used geospatial data access library.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.