找不到OpenSSL(如果已安装),请相应地设置OPENSSL_PREFIX环境变量

时间:2019-06-04 18:15:08

标签: perl openssl debian cpan

当我尝试在Debian上安装Net::SSLeay时,我会得到

a

但是我确实安装了OpenSSL,

Use of uninitialized value in subroutine entry at Makefile.PL line 290.
Use of uninitialized value $exec in -x at Makefile.PL line 108.
*** Could not find OpenSSL
    If it's already installed, please set the OPENSSL_PREFIX environment
    variable accordingly. If it isn't installed yet, get the latest version
    from http://www.openssl.org/.
N/A

我也尝试过玩$ dpkg -l libssl-dev Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-================-============-============-================================================ ii libssl-dev:amd64 1.1.1b-2 amd64 Secure Sockets Layer toolkit - development files

1 个答案:

答案 0 :(得分:2)

这是不是错误,是由于无法找到标头(由OPENSSL_PREFIX提供)而导致的,但因为找不到openssl二进制实用程序而导致。标头仍然是必需的,但是您也需要二进制-dev实用程序。您可以使用apt本身安装openssl,也可以从源代码构建模块。从apt安装Net::SSLeay的简单方法可以通过

完成
Net::SSLeay

或者,您可以安装二进制文件sudo apt install libnet-ssleay-perl ,然后尝试使用cpan重新安装。

openssl

您可以验证安装了sudo apt install openssl libssl-dev zlib1g-dev ## all requirements to build Net::SSLeay cpanm Net::SSLeay (如果可行,则上述错误不应重现)

openssl