简体   繁体   English

从源代码构建 gdal 会导致与 openssl 的链接错误

[英]Builing gdal from source gives linking error with openssl

I'm trying to build gdal==3.4.1 from source on Redhat UBI8.6 with conda in a python 3.8 environment and proj 8.2.1 using the following:我正在尝试在 python 3.8 环境和 proj 8.2.1 中使用 conda 从 Redhat UBI8.6 上的源代码构建 gdal==3.4.1,使用以下命令:

./configure --prefix=$CONDA_PREFIX --with-netcdf=$CONDA_PREFIX --with-proj=$CONDA_PREFIX --with-curl=no
make -j 24   > /dev/null
make install > /dev/null

But no matter if I change the gdal version to the latest or an older one, I keep getting a linker error between libk5crypto and libssh with openssl .但是,无论我将 gdal 版本更改为最新版本还是旧版本,我都会在libk5cryptolibssh之间使用openssl收到 linker 错误。

[01:54:25][root@name]# whereis openssl openssl: /usr/bin/openssl /usr/include/openssl /root/anaconda3/envs/myenv/bin/openssl /usr/share/man/man1/openssl.1ssl.gz [01:54:25][root@name]# whereis openssl openssl: /usr/bin/openssl /usr/include/openssl /root/anaconda3/envs/myenv/bin/openssl /usr/share/man/man1/openssl.1ssl.gz

$ rpm -q openssl openssl-1.1.1k-7.el8_6.x86_64 $ rpm -q openssh openssh-8.0p1-13.el8.x86_64 $ rpm -q openssl openssl-1.1.1k-7.el8_6.x86_64 $ rpm -q openssh openssh-8.0p1-13.el8.x86_64

Error output:错误 output:

/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:89: gdalinfo] Error 1
make[1]: *** Waiting for unfinished jobs....
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:110: nearblack] Error 1
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:92: gdalmdiminfo] Error 1
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:113: gdalmanage] Error 1
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:122: gdalbuildvrt] Error 1
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:104: gdalwarp] Error 1
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:191: gdal_viewshed] Error 1
make: *** [GNUmakefile:123: apps-target] Error 2
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
/usr/lib64/libssh.so.4: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
make[1]: *** [GNUmakefile:89: gdalinfo] Error 1
make: *** [GNUmakefile:123: apps-target] Error 2

I have no clue anymore as to what is causing this problem and I cannot find any solution on the web.我不知道是什么导致了这个问题,我在 web 上找不到任何解决方案。 Reaching out to see if anyone has any solution, tips, clue as to what is going on.伸出手来看看是否有人有任何解决方案、提示和线索,以了解正在发生的事情。

This is not a GDAL problem, your /usr/lib64/libssh.so.4 has missing references.这不是 GDAL 问题,您的/usr/lib64/libssh.so.4缺少引用。 Either it is compiled against a missing OpenSSL library, either this OpenSSL library is not in the GDAL linking path.要么它是针对缺少的 OpenSSL 库编译的,要么这个 OpenSSL 库不在 GDAL 链接路径中。 You could be missing security updates or you can have multiple OpenSSL libraries installed.您可能缺少安全更新,或者您可以安装多个 OpenSSL 库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM