티스토리 뷰

카테고리 없음

open ssl 3.0.1 버전 업그레이드

미니대왕님 2022. 5. 13. 11:43

open ssl 3.0.1 버전 업그레이드 

1.root@tommypagy-VirtualBox:~# wget https://github.com/openssl/openssl/archive/refs/tags/openssl-3.0.1.tar.gz

[파일을 다운로드 받습니다.]

2. 현재 버전을 체크 합니다. 

 

3. root@tommypagy-VirtualBox:~# tar -zxvf openssl-3.0.1.tar.gz 압축을 해제 합니다.

4. root@tommypagy-VirtualBox:/home/master/download/openssl-openssl-3.0.1# ll 압축푼 위치의 내용확인

5. root@tommypagy-VirtualBox:/home/master/download/openssl-openssl-3.0.1# ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared config 를 실행합니다.

6.gcc 가 없다고 나오네요 

root@tommypagy-VirtualBox:/home/master/download/openssl-openssl-3.0.1# apt-get install  gcc

 

7. root@tommypagy-VirtualBox:/home/master/download/openssl-openssl-3.0.1# apt-get install  gcc

gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DBSAES_ASM -DCMLL_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DMD5_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DX25519_ASM -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/ssl/lib64/engines-3\"" -DMODULESDIR="\"/usr/local/ssl/lib64/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG  -MMD -MF crypto/comp/libcrypto-lib-comp_err.d.tmp -MT crypto/comp/libcrypto-lib-comp_err.o -c -o crypto/comp/libcrypto-lib-comp_err.o crypto/comp/comp_err.c
crypto/comp/c_zlib.c:36:11: fatal error: zlib.h: No such file or directory
 # include <zlib.h>
           ^~~~~~~~
compilation terminated.
Makefile:14280: recipe for target 'crypto/comp/libcrypto-lib-c_zlib.o' failed
make[1]: *** [crypto/comp/libcrypto-lib-c_zlib.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/master/download/openssl-openssl-3.0.1'
Makefile:3213: recipe for target 'build_sw' failed
make: *** [build_sw] Error 2

8. ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib

 

9. apt install make

10. root@tommypagy-VirtualBox:/home/master/download/openssl-openssl-3.0.1# make -j 4

11. make -j 4

* 아래와 같은 에러 발생시 ...

configure: error: *** zlib.h missing - please install first or check config.log ***
fatal error: zlib.h: no such file or directory
"iostreams/zlib.cpp", line 19.10: 1540-0836 (S) The #include file "zlib.h" is not found.
make[3]: *** [zlib.o] Error 1

 

대부분의 최신 Debian 계열 (+Ubuntu) OS

apt install zlib1g-dev

오래된 버전의 Debian 계열 (+Ubuntu) OS

apt install zlib1g-dev

RedHat Enterprise Linux 계열 (CentOS, Fedora) OS

dnf install zlib-devel

참고로 dnf 명령어가 없을 경우 yum 을 대신 사용하시면 됩니다. RedHat/CentOS 7 yum을, RedHat/CentOS 8 dnf를 주로 사용합니다.

 

 

12. cpan perl -MCPAN -e shell force install WWW::Curl::Easy

Cannot find "WWW::Curl::Easy" in p <- 오류 발생시 처리

https://stackoverflow.com/questions/42290344/failed-during-install-wwwcurleasy-in-cpan

root@tommypagy-VirtualBox:/home/master/download# cpan perl -MCPAN -e shell force install WWW::Curl::Easy
Loading internal null logger. Install Log::Log4perl for logging messages

CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.

Would you like to configure as much as possible automatically? [yes] yes
Fetching with LWP:
http://www.cpan.org/authors/01mailrc.txt.gz
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://www.cpan.org/modules/02packages.details.txt.gz
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Fri, 13 May 2022 00:17:03 GMT
..............
  New CPAN.pm version (v2.34) available.
  [Currently running version is v2.18]
  You might want to try

 

 

13. make install

#(3.0.1 VS 3.0.3) 둘다 설치는 잘되네요



root@tommypagy-VirtualBox:/home/master/download/openssl-openssl-3.0.3# make install
make depend && make _build_libs
make[1]: Entering directory '/home/master/download/openssl-openssl-3.0.3'
make[1]: Leaving directory '/home/master/download/openssl-openssl-3.0.3'
make[1]: Entering directory '/home/master/download/openssl-openssl-3.0.3'
make[1]: Leaving directory '/home/master/download/openssl-openssl-3.0.3'
created directory `/usr/local/ssl'
created directory `/usr/local/ssl/lib64'
*** Installing runtime libraries
install libcrypto.so.3 -> /usr/local/ssl/lib64/libcrypto.so.3
install libssl.so.3 -> /usr/local/ssl/lib64/libssl.so.3
*** Installing development files
created directory `/usr/local/ssl/include'
created directory `/usr/local/ssl/include/openssl'
install ./include/openssl/aes.h -> /usr/local/ssl/include/openssl/aes.h
install ./include/openssl/asn1.h -> /usr/local/ssl/include/openssl/asn1.h
install ./include/openssl/asn1_mac.h -> /usr/local/ssl/include/openssl/asn1_mac.h
install ./include/openssl/asn1err.h -> /usr/local/ssl/include/openssl/asn1err.h
install ./include/openssl/asn1t.h -> /usr/local/ssl/include/openssl/asn1t.h
install ./include/openssl/async.h -> /usr/local/ssl/include/openssl/async.h
install ./include/openssl/asyncerr.h -> /usr/local/ssl/include/openssl/asyncerr.h
install ./include/openssl/bio.h -> /usr/local/ssl/include/openssl/bio.h
install ./include/openssl/bioerr.h -> /usr/local/ssl/include/openssl/bioerr.h
댓글