源码安装openssl遇到的一些问题及解决方式

简介: 本文总结了在源码安装openssl过程中遇到的一些问题及其解决方法,包括缺少libssl.so.1.1库文件、缺少Perl模块以及权限不足时如何指定安装目录等问题。

1 问题

使用from LAC import LAC时报错
ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory

2 解决办法

源码安装openssl

参考:https://blog.csdn.net/estelle\_belle/article/details/111181037

1 问题

centos系统通过源码安装openssl时执行“./config --prefix=/usr/local/openssl1.1.1”报错:

Operating system: x86_64-whatever-linux2
Can’t locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure line 15.
BEGIN failed–compilation aborted at ./Configure line 15.
Can’t locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure line 15.
BEGIN failed–compilation aborted at ./Configure line 15.
This system (linux-x86_64) is not supported. See file INSTALL for details.

2 解决办法

解决办法:

sudo yum install perl-FindBin

1 问题

执行make && make install报错

/usr/bin/perl “-I.” -Mconfigdata “util/dofile.pl”
“-oMakefile” include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
/usr/bin/perl “-I.” -Mconfigdata “util/dofile.pl”
“-oMakefile” include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
/usr/bin/perl “-I.” -Mconfigdata “util/dofile.pl”
“-oMakefile” include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
make depend && make _all
make[1]: Entering directory ‘/data/jupyterdata/openssl-1.1.1u’
Can’t locate File/Compare.pm in @INC (you may need to install the File::Compare module) (@INC contains: . /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./util/add-depends.pl line 16.
BEGIN failed–compilation aborted at ./util/add-depends.pl line 16.
make[1]: *** [Makefile:264: depend] Error 2
make[1]: Leaving directory ‘/data/jupyterdata/openssl-1.1.1u’
make: *** [Makefile:174:all] 错误 2

2 解决办法

sudo yum install perl-File-Compare -y

1 问题

执行make && make install报错
Cannot create directory /usr/local/openssl1.1.1: Permission denied
make: *** [Makefile:436:install_runtime_libs] 错误 2

2 解决

这个错误提示告诉我们当前用户没有权限在/usr/local目录下创建openssl1.1.1目录。在执行make install时,可以添加prefix参数,将openssl安装到可读写的目录下。比如安装到当前用户的主目录下的openssl-1.1.1目录,命令如下:

./config --prefix=/home/用户名/openssl-1.1.1
make && make install

1 问题

执行make && make install报错

报错:Can’t locate File/Copy.pm in @INC (you may need to install the File::Copy module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./util/process_docs.pl line 14.
BEGIN failed–compilation aborted at ./util/process_docs.pl line 14.
make: *** [Makefile:502:install_man_docs] 错误 2

2 解决

这个错误提示告诉我们当前系统的Perl里面没有File::Copy模块。可以通过以下命令安装File::Copy模块:

sudo yum install perl-File-Copy -y
安装完成后,重新执行make命令即可。

目录
相关文章
|
6月前
|
安全 数据安全/隐私保护
openssh和openssl的版本关系
【4月更文挑战第14天】openssh和openssl的版本关系
1319 0
|
6月前
|
安全 Shell 网络安全
openssh和openssl的区别是什么?
【4月更文挑战第14天】openssh和openssl的区别是什么?
848 0
|
6月前
|
Linux
Linux安装OpenSSL
Linux安装OpenSSL
|
安全 算法 中间件
CentOS7下rpm包方式升级openssl到安全版本1.1.1n
CentOS7下rpm包方式升级openssl到安全版本1.1.1n
4024 0
CentOS7下rpm包方式升级openssl到安全版本1.1.1n
|
Ubuntu
ubuntu系统安装openssl-devel
ubuntu系统安装openssl-devel
340 0
|
安全
升级OpenSSL
升级OpenSSL
617 0
升级OpenSSL
|
网络安全 Windows
openssl如何在Windows安装?
openssl如何在Windows安装?
1918 0
|
Ubuntu 应用服务中间件 nginx
ubuntu下安装nginx时依赖库zlib,pcre,openssl安装方法
ubuntu下安装nginx时依赖库zlib,pcre,openssl安装方法
3946 0