需要Python3.11的环境,Linux下安装中发现,需要openssl1.1.1的支持,目前大部分系统openssl为1.0.2,在这里介绍编译安装。
登录网站
找到 openssl1.1.1 的下载连接
https:///source/openssl-1.1.1t.tar.gz
[ec2-user@ip-10-103-1-231 ~]$ wget https:///source/openssl-1.1.1t.tar.gz
--2023-05-24 02:39:08-- https:///source/openssl-1.1.1t.tar.gz
Resolving ( )... 184.50.93.94, 2600:1417:1000:882::c1e, 2600:1417:1000:8a4::c1e
Connecting to ( )|184.50.93.94|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9881866 (9.4M) [application/x-gzip]
Saving to: ‘openssl-1.1.1t.tar.gz’
100%[=========================================================================================>] 9,881,866 16.9MB/s in 0.6s
2023-05-24 02:39:09 (16.9 MB/s) - ‘openssl-1.1.1t.tar.gz’ saved [9881866/9881866]
[ec2-user@ip-10-103-1-231 ~]$ tar -xvf openssl-1.1.1t.tar.gz
openssl-1.1.1t/
openssl-1.1.1t/ACKNOWLEDGEMENTS
openssl-1.1.1t/AUTHORS
openssl-1.1.1t/CHANGES
openssl-1.1.1t/CONTRIBUTING
openssl-1.1.1t/Configurations/
……
openssl-1.1.1t/util/process_docs.pl
openssl-1.1.1t/util/shlib_wrap.sh.in
openssl-1.1.1t/util/su-filter.pl
openssl-1.1.1t/util/unlocal_shlib.com.in
openssl-1.1.1t/wycheproof/
解压后, config 到 /usr/local/openssl11 文件夹,和原来 1.0.2k 版本区分开。
[ec2-user@ip-10-103-1-231 openssl-1.1.1t]$ sudo ./config --prefix=/usr/local/openssl11
Operating system: x86_64-whatever-linux2
Configuring OpenSSL version 1.1.1t (0x1010114fL) for linux-x86_64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile
**********************************************************************
*** ***
*** OpenSSL has been successfully configured ***
*** ***
*** If you encounter a problem while building, please open an ***
*** issue on GitHub < https://github.com/openssl/openssl/issues> ***
*** and include the output from the following command: ***
*** ***
*** perl configdata.pm --dump ***
*** ***
*** (If you are new to OpenSSL, you might want to consult the ***
*** 'Troubleshooting' section in the INSTALL file first) ***
*** ***
**********************************************************************
[ec2-user@ip-10-103-1-231 openssl-1.1.1t]$ sudo make
/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 `/home/ec2-user/openssl-1.1.1t'
make[1]: Leaving directory `/home/ec2-user/openssl-1.1.1t'
make[1]: Entering directory `/home/ec2-user/openssl-1.1.1t'
……
rm -f test/x509aux
${LDCMD:-gcc} -pthread -m64 -Wa,--noexecstack -Wall -O3 -L. \
-o test/x509aux test/x509aux.o \
test/libtestutil.a -lcrypto -ldl -pthread
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" apps/CA.pl.in > "apps/CA.pl"
chmod a+x apps/CA.pl
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" apps/tsget.in > "apps/tsget.pl"
chmod a+x apps/tsget.pl
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" tools/c_rehash.in > "tools/c_rehash"
chmod a+x tools/c_rehash
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" util/shlib_wrap.sh.in > "util/shlib_wrap.sh"
chmod a+x util/shlib_wrap.sh
make[1]: Leaving directory `/home/ec2-user/openssl-1.1.1t'
[ec2-user@ip-10-103-1-231 openssl-1.1.1t]$ sudo make install
make depend && make _build_libs
make[1]: Entering directory `/home/ec2-user/openssl-1.1.1t'
make[1]: Leaving directory `/home/ec2-user/openssl-1.1.1t'
make[1]: Entering directory `/home/ec2-user/openssl-1.1.1t'
make[1]: Nothing to be done for `_build_libs'.
make[1]: Leaving directory `/home/ec2-user/openssl-1.1.1t'
created directory `/usr/local/openssl11'
created directory `/usr/local/openssl11/lib'
*** Installing runtime libraries
install libcrypto.so.1.1 -> /usr/local/openssl11/lib/libcrypto.so.1.1
install libssl.so.1.1 -> /usr/local/openssl11/lib/libssl.so.1.1
*** Installing development files
created directory `/usr/local/openssl11/include'
created directory `/usr/local/openssl11/include/openssl'
……
/usr/local/openssl11/share/doc/openssl/html/man7/des_modes.html
/usr/local/openssl11/share/doc/openssl/html/man7/evp.html
/usr/local/openssl11/share/doc/openssl/html/man7/ossl_store-file.html
/usr/local/openssl11/share/doc/openssl/html/man7/ossl_store.html
/usr/local/openssl11/share/doc/openssl/html/man7/passphrase-encoding.html
/usr/local/openssl11/share/doc/openssl/html/man7/proxy-certificates.html
/usr/local/openssl11/share/doc/openssl/html/man7/scrypt.html
/usr/local/openssl11/share/doc/openssl/html/man7/ssl.html
/usr/local/openssl11/share/doc/openssl/html/man7/x509.html
[ec2-user@ip-10-103-1-231 openssl-1.1.1t]$ cd /usr/local/openssl11/bin/
[ec2-user@ip-10-103-1-231 bin]$ ls
c_rehash openssl
[ec2-user@ip-10-103-1-231 bin]$ ./openssl version
OpenSSL 1.1.1t 7 Feb 2023 (Library: OpenSSL 1.1.1g FIPS 21 Apr 2020)
至此安装成功。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28538954/viewspace-2954183/ ,如需转载,请注明出处,否则将追究法律责任。