在 REDHAT 7 上使用 MBTILES 驱动程序编译/安装 GDAL 2.2.x

在 REDHAT 7 上使用 MBTILES 驱动程序编译/安装 GDAL 2.2.x

我正在尝试让 GDAL 和 MBTiles 驱动程序在 RHEL7 实例上运行。

我已经下载了源代码并尝试使用 MBTILES 进行编译。这是我第一次自己从源代码编译某些东西。由于某种原因,我传递的参数不起作用。

我使用这个程序:

cd /tmp
wget http://download.osgeo.org/gdal/2.2.1/gdal-2.2.1.tar.gz 
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

当我提交配置行时,我得到了一些关于将要启用和不启用的内容的输出。虽然我已经设置了 --with-sqlite3 选项和其他选项,但它们并没有添加到构建中。我想知道为什么我安装了依赖项 libspacialite、sqlite3、geos...

./configure 完成处理后,我得到这个输出,指出 sqlite3 和 spatialite 不会被添加???

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

  Installation directory:    /usr
  C compiler:                gcc -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2
  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

有人知道我如何才能获得 MBTiles 驱动程序吗?

答案1

要从源代码编译程序,在 RHEL 系统上,您需要安装相应的-devel软件包。例如,对于 SQLite 支持,您需要安装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         : http://www.sqlite.org/
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.

对于输出中未显示的每个附加功能也是如此。花一些时间yum search应该会找到-devel其中大部分的软件包。但您需要启用可选频道和 EPEL 才能获取其中的一些。

还请记住,EPEL 中有一个旧版本的 GDAL,因此,如果这足以满足您的使用,那么您可能根本不需要自己编译它。

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         : http://www.gdal.org
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.

相关内容