Cài đặt thư viện chia sẻ OpenSSL trên CentOS 6.5


11
OS: CentOS-6.5-x86_64-minimal

Tôi đã tải xuống phiên bản mới nhất của OpenSSL

Trích xuất nó với tar -xvzf openssl-1.0.1e.tar.gz

cd openssl-1.0.1e
./config --prefix=/usr/local
make

nó cho tôi lỗi sau:

making all in crypto...
make[1]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto'
making all in crypto/objects...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/objects'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/objects'
making all in crypto/md4...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/md4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/md4'
making all in crypto/md5...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/md5'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/md5'
making all in crypto/sha...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/sha'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/sha'
making all in crypto/mdc2...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/mdc2'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/mdc2'
making all in crypto/hmac...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/hmac'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/hmac'
making all in crypto/ripemd...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/ripemd'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/ripemd'
making all in crypto/whrlpool...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/whrlpool'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/whrlpool'
making all in crypto/des...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/des'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/des'
making all in crypto/aes...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/aes'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/aes'
making all in crypto/rc2...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/rc2'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/rc2'
making all in crypto/rc4...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/rc4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/rc4'
making all in crypto/idea...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/idea'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/idea'
making all in crypto/bf...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/bf'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/bf'
making all in crypto/cast...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/cast'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/cast'
making all in crypto/camellia...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/camellia'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/camellia'
making all in crypto/seed...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/seed'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/seed'
making all in crypto/modes...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/modes'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/modes'
making all in crypto/bn...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/bn'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/bn'
making all in crypto/ec...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/ec'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/ec'
making all in crypto/rsa...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/rsa'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/rsa'
making all in crypto/dsa...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/dsa'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/dsa'
making all in crypto/ecdsa...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/ecdsa'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/ecdsa'
making all in crypto/dh...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/dh'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/dh'
making all in crypto/ecdh...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/ecdh'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/ecdh'
making all in crypto/dso...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/dso'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/dso'
making all in crypto/engine...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/engine'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/engine'
making all in crypto/buffer...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/buffer'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/buffer'
making all in crypto/bio...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/bio'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/bio'
making all in crypto/stack...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/stack'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/stack'
making all in crypto/lhash...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/lhash'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/lhash'
making all in crypto/rand...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/rand'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/rand'
making all in crypto/err...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/err'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/err'
making all in crypto/evp...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/evp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/evp'
making all in crypto/asn1...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/asn1'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/asn1'
making all in crypto/pem...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/pem'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/pem'
making all in crypto/x509...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/x509'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/x509'
making all in crypto/x509v3...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/x509v3'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/x509v3'
making all in crypto/conf...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/conf'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/conf'
making all in crypto/txt_db...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/txt_db'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/txt_db'
making all in crypto/pkcs7...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/pkcs7'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/pkcs7'
making all in crypto/pkcs12...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/pkcs12'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/pkcs12'
making all in crypto/comp...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/comp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/comp'
making all in crypto/ocsp...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/ocsp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/ocsp'
making all in crypto/ui...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/ui'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/ui'
making all in crypto/krb5...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/krb5'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/krb5'
making all in crypto/cms...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/cms'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/cms'
making all in crypto/pqueue...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/pqueue'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/pqueue'
making all in crypto/ts...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/ts'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/ts'
making all in crypto/srp...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/srp'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/srp'
making all in crypto/cmac...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/crypto/cmac'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto/cmac'
if [ -n "" ]; then \
                (cd ..; make libcrypto.so.1.0.0); \
        fi
make[1]: Leaving directory `/usr/local/src/openssl-1.0.1e/crypto'
making all in ssl...
make[1]: Entering directory `/usr/local/src/openssl-1.0.1e/ssl'
if [ -n "" ]; then \
                (cd ..; make libssl.so.1.0.0); \
        fi
make[1]: Leaving directory `/usr/local/src/openssl-1.0.1e/ssl'
making all in engines...
make[1]: Entering directory `/usr/local/src/openssl-1.0.1e/engines'
echo

making all in engines/ccgost...
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/engines/ccgost'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/engines/ccgost'
make[1]: Leaving directory `/usr/local/src/openssl-1.0.1e/engines'
making all in apps...
make[1]: Entering directory `/usr/local/src/openssl-1.0.1e/apps'
rm -f openssl
shlib_target=; if [ -n "" ]; then \
                shlib_target="linux-shared"; \
        elif [ -n "" ]; then \
          FIPSLD_CC="gcc"; CC=/usr/local/ssl/fips-2.0/bin/fipsld; export CC FIPSLD_CC; \
        fi; \
        LIBRARIES="-L.. -lssl  -L.. -lcrypto" ; \
        make -f ../Makefile.shared -e \
                APPNAME=openssl OBJECTS="openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o" \
                LIBDEPS=" $LIBRARIES -ldl" \
                link_app.${shlib_target}
make[2]: Entering directory `/usr/local/src/openssl-1.0.1e/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl  -L.. -lcrypto -ldl}"; LDCMD="${LDCMD:-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )
../libcrypto.a(x86_64cpuid.o): In function `OPENSSL_cleanse':
(.text+0x1a0): multiple definition of `OPENSSL_cleanse'
../libcrypto.a(mem_clr.o):mem_clr.c:(.text+0x0): first defined here
../libcrypto.a(cmll-x86_64.o): In function `Camellia_cbc_encrypt':
(.text+0x1f00): multiple definition of `Camellia_cbc_encrypt'
../libcrypto.a(cmll_cbc.o):cmll_cbc.c:(.text+0x0): first defined here
../libcrypto.a(aes-x86_64.o): In function `AES_encrypt':
(.text+0x460): multiple definition of `AES_encrypt'
../libcrypto.a(aes_core.o):aes_core.c:(.text+0x5cf): first defined here
../libcrypto.a(aes-x86_64.o): In function `AES_decrypt':
(.text+0x9f0): multiple definition of `AES_decrypt'
../libcrypto.a(aes_core.o):aes_core.c:(.text+0xa4b): first defined here
../libcrypto.a(aes-x86_64.o): In function `private_AES_set_encrypt_key':
(.text+0xab0): multiple definition of `private_AES_set_encrypt_key'
../libcrypto.a(aes_core.o):aes_core.c:(.text+0x0): first defined here
../libcrypto.a(aes-x86_64.o): In function `private_AES_set_decrypt_key':
(.text+0xd80): multiple definition of `private_AES_set_decrypt_key'
../libcrypto.a(aes_core.o):aes_core.c:(.text+0x3e5): first defined here
../libcrypto.a(aes-x86_64.o): In function `AES_cbc_encrypt':
(.text+0xfa0): multiple definition of `AES_cbc_encrypt'
../libcrypto.a(aes_cbc.o):aes_cbc.c:(.text+0x0): first defined here
collect2: ld returned 1 exit status
make[2]: *** [link_app.] Error 1
make[2]: Leaving directory `/usr/local/src/openssl-1.0.1e/apps'
make[1]: *** [openssl] Error 2
make[1]: Leaving directory `/usr/local/src/openssl-1.0.1e/apps'
make: *** [build_apps] Error 1

Tôi đã thử yum -y install openssl.

Tôi muốn cài đặt OpenSSL để có thể sử dụng giao thức HTTPS trong CURL và các ứng dụng khác nhau.

openssl (là nhị phân) được cài đặt, nhưng OpenSSL (được yêu cầu cho giao thức HTTPS chưa được cài đặt).

Bất kỳ giải pháp cho vấn đề này?


Bạn đang thiếu phần tốt của lỗi đó. Có vẻ như nó có thể là nhiều biểu tượng nhưng khó có thể nói từ những gì bạn đã đăng.
casey

Đã cập nhật bài đăng
Michael harris

Câu trả lời:


29

Tôi muốn biên dịch tomcat với sự hỗ trợ OpenSSL và chỉ riêng mã nguồn OpenSSL là không đủ. Hãy thử cài đặt các thư viện phát triển OpenSSL:

yum install -y openssl-devel

Tôi không nghĩ rằng -ytùy chọn tye là cần thiết.
Tomáš Zato - Phục hồi Monica

1
@ TomášZato -ylà cần thiết nếu bạn không muốn được nhắc và / hoặc cần chạy cài đặt không giám sát.
Andrew

Chỉ để giải thích điều này là về cái gì : devel bao gồm các tệp tiêu đề cho phép - như bạn nói - biên dịch . Nhưng điều này không bao gồm chính các thư viện; đó cũng là cần thiết để liên kết như là một phần của quá trình xây dựng. Trong một số bản phân phối ít nhất và CentOS và Fedora là hai ví dụ, chúng được chia thành hai gói: -devel for và gói kia sẽ khác nhau. Và tôi có thể thêm rằng các lỗi trong câu hỏi là lỗi liên kết; nếu các tệp tiêu đề chưa được cài đặt, bạn sẽ không đi xa được. Hơn nữa, nếu bạn nhìn vào openssl-libs, bạn sẽ tìm thấy các tệp thư viện.
Pryftan

3

Vấn đề của bạn có vẻ như curlkhông được biên soạn với opensslsự hỗ trợ. Bạn có thể xác nhận bằng cách kiểm tra xem giao thức nào curlhỗ trợ.

Thí dụ

Từ hệ thống của tôi.

$ lsb_release -r
Release:    6.5

Thông tin phiên bản của Curl.

$ curl -V
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp 
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz 

Mặc định openssllà ở phiên bản này:

$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

hệ thống của tôi cho thấy như vậy, nhưng giải pháp là gì?
AMB

@AMB bạn có nhận được giải pháp nào cho việc này không
vks

0

Rõ ràng là lỗi vì làm theo các bước

make [2]: Rời khỏi thư mục /usr/local/src/openssl-1.0.1e/apps' make[1]: *** [openssl] Error 2 make[1]: Leaving directory/usr/local/src/openssl-1.0.1e/apps '

bạn có thể sửa lỗi đó bằng cách cấu hình bằng lệnh bellow

./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl

-1

Tôi cũng đã gặp lỗi này và nó đã sửa nó -

./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.