我正在Ubuntu 16.04上从源代码安装GDAL 3.0.1,步骤如下。
$ wget https://download.osgeo.org/gdal/3.0.1/gdal-3.0.1.tar.gz
$ tar xzf gdal-3.0.1.tar.gz
$ cd gdal-3.0.1
$ ./configure --with-python --with-png=internal --with-jpeg=internal
$ make运行./configure没有任何问题:
GDAL is now configured for x86_64-pc-linux-gnu
Installation directory: /usr/local
C compiler: gcc -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2
C++ compiler: g++ -std=c++11 -DHAVE_AVX_AT_COMPILE_TIME -DHAVE_SSSE3_AT_COMPILE_TIME -DHAVE_SSE_AT_COMPILE_TIME -g -O2
C++14 support: no
LIBTOOL support: yes
LIBZ support: external
LIBLZMA support: no
ZSTD support: no
cryptopp support: no
crypto/openssl support: yes
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
JPEG-Lossless/CharLS: no
OGDI support: no
HDF4 support: no
HDF5 support: yes
Kea support: no
NetCDF support: yes
NetCDF has netcdf_mem.h: 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
EPSILON support: no
WebP support: no
cURL support (wms/wcs/...):yes
PostgreSQL support: yes
LERC support: yes
MySQL support: no
Ingres support: no
Xerces-C support: no
Expat support: yes
libxml2 support: yes
Google libkml support: no
ODBC 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: yes
PCRE support: yes
SpatiaLite support: no
RasterLite2 support: no
Teigha (DWG and DGNv8): no
INFORMIX DataBlade support:no
GEOS support: yes
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
MongoCXX v3 support: no
HDFS support: no
TileDB support: no
userfaultfd support: yes
misc. gdal formats: aaigrid adrg aigrid airsar arg blx bmp bsb cals ceos ceos2 coasp cosar ctg dimap dted e00grid elas envisat ers fit gff gsg gxf hf2 idrisi ignfheightasciigrid ilwis ingr iris iso8211 jaxapalsar jdem kmlsuperoverlay l1b leveller map mrf msgn ngsgeoid nitf northwood pds prf r raw rmf rs2 safe saga sdts sentinel2 sgi sigdem srtmhgt terragen til tsx usgsdem xpm xyz zmap rik ozi grib eeda plmosaic rda wcs wms wmts daas rasterlite mbtiles pdf
disabled gdal formats:
misc. ogr formats: aeronavfaa arcgen avc bna cad csv dgn dxf edigeo geoconcept georss gml gmt gpsbabel gpx gtm htf jml mvt ntf openair openfilegdb pgdump rec s57 segukooa segy selafin shape sua svg sxf tiger vdv wasp xplane idrisi pds sdts ods xlsx amigocloud carto cloudant couchdb csw elastic gft ngw plscenes wfs gpkg vfk osm
disabled ogr formats:
SWIG Bindings: python
PROJ >= 6: yes
enable GNM building: yes
enable pthread support: yes
enable POSIX iconv support:yes
hide internal symbols: no但是,在运行make时,它会退出,并显示以下错误:
... /.libs/libgdal.so: undefined reference to `EVP_MD_CTX_new'
... /.libs/libgdal.so: undefined reference to `EVP_MD_CTX_free'
collect2: error: ld returned 1 exit status
GNUmakefile:82: recipe for target 'gdalinfo' failed
make[1]: *** [gdalinfo] Error 1我在搜索这个错误时看到的是它与OpenSSL有关。
我安装了几个版本的OpenSSL,我担心这可能会把它搞砸。
使用apt-get安装的OpenSSL为:
$ /usr/bin/openssl version
OpenSSL 1.0.2g 1 Mar 2016但是,也有一个安装了Miniconda的OpenSSL (在搜索路径中,它位于usr/bin之前)
$ openssl version
OpenSSL 1.1.1c 28 May 2019我不知道如何告诉GDAL在哪里可以找到OpenSSL,也不知道这样做是否能解决我的问题。
有什么想法吗?
发布于 2020-01-15 00:01:52
我不知道"gdal“是什么,但我看到了你的问题,并想留下一个提示,在编译时,需要的是库而不是二进制。
在您的特殊情况下,OpenSSL加密库是必需的。正如您正确了解的那样,函数EVP_MD_CTX_new和EVP_MD_CTX_free是在版本1.1中引入的。
所以我假设你没有安装正确的库。
您可以搜索术语libcrypto.so来查找您的版本。大多数情况下,这是一个指向包含版本的真实库的符号链接。在我的机器(libcrypto.so )上,库位于/ -> / lib /x86_64-linux-gnu。
希望这能有所帮助。
https://stackoverflow.com/questions/57605998
复制相似问题