我尝试在Ubuntu 16.04上编译并安装OpenSSL的较新perl模块:(https://www.claudiokuenzler.com/blog/1017/perl-lwp-unable-connect-tls-1.2-url-fail-sslv3-alert-handshake-failure)
新的OpenSSL似乎安装正确(文件夹和文件在~/build/openssl中创建)。编译新的SSLeay失败,因为它找不到libssl.so.1.1:
beheer@system:~/.local/share/.cpan/build/Net-SSLeay-1.92-eimXJF$ sudo OPENSSL_PREFIX=~/build/openssl perl Makefile.PL
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n] y
*** Be sure to use the same compiler and options to compile your OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
~/build/openssl/bin/openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Use of uninitialized value $output in scalar chomp at Makefile.PL line 398.
Use of uninitialized value $output in pattern match (m//) at Makefile.PL line 401.
Use of uninitialized value $output in pattern match (m//) at Makefile.PL line 404.
Use of uninitialized value $output in concatenation (.) or string at Makefile.PL line 413.
*** OpenSSL version test failed
(`' has been returned)
Either you have bogus OpenSSL or a new version has changed the version
number format. Please inform the authors!
请求的libssl.so.1.1可在~/build/openssl/lib上获得
使用OPENSSL_PREFIX的路径时,找不到头:
sudo OPENSSL_PREFIX=~/build/openssl/lib perl Makefile.PL
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n] y
Checking if your kit is complete...
Looks good
Warning: Guessing NAME [Net-SSLeay-1.92-eimXJF] from current directory name.
Warning: NAME must be a package name
*** Be sure to use the same compiler and options to compile your OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
******************************************************************************
* COULD NOT FIND LIBSSL HEADERS *
* *
* The libssl header files are required to build Net-SSLeay, but they are *
* missing from ~/build-openssl/lib. They would typically reside *
* in ~/build/openssl/lib/include/openssl. *
* *
* If you are using the version of OpenSSL/LibreSSL packaged by your Linux *
* distribution, you may need to install the corresponding "development" *
* package via your package manager (e.g. libssl-dev for OpenSSL on Debian *
* and Ubuntu, or openssl-devel for OpenSSL on Red Hat Enterprise Linux and *
* Fedora). *
******************************************************************************
通过参数添加路径没有帮助:~/.local/share/.cpan/build/Net-SSLeay-1.92-eimXJF$ sudo OPENSSL_PREFIX=~/build/openssl perl Makefile.PL INC='-I~/build/openssl/lib -I~/build/openssl/include -I~/build/openssl/bin' LIBS='~/build/openssl/lib'
这会产生相同的错误:error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
1条答案
按热度按时间pxyaymoc1#
我不知道你是怎么安装openssl的(也许你没有?),但是你不应该需要路径的“lib”部分。下面是我设置的,我没有这个问题。Net::SSLeay的文档中的示例也不包括“lib”部分。
如果您还没有完成
make install
部分,那么您就没有给库将所有内容放在正确位置的机会。