Menginstal OpenSSL shared library di CentOS 6.5

11
OS: CentOS-6.5-x86_64-minimal

Saya mengunduh OpenSSL versi terbaru

Diekstraksi dengan tar -xvzf openssl-1.0.1e.tar.gz

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

itu memberi saya kesalahan berikut:

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

Saya mencoba yum -y install openssl.

Saya ingin menginstal OpenSSL untuk dapat menggunakan protokol HTTPS di CURL, dan berbagai aplikasi.

openssl (yang merupakan biner) diinstal, tetapi OpenSSL (yang diperlukan untuk protokol HTTPS tidak diinstal).

Ada solusi untuk masalah ini?

Michael harris
sumber
Anda melewatkan bagian yang baik dari kesalahan itu. Sepertinya mungkin beberapa simbol tetapi sulit untuk mengetahui dari apa yang Anda poskan.
Casey
Diperbarui pos
Michael harris

Jawaban:

29

Saya ingin mengkompilasi kucing jantan dengan dukungan OpenSSL dan kode sumber OpenSSL saja tidak cukup. Coba instal pustaka pengembangan OpenSSL:

yum install -y openssl-devel
Andrew
sumber
Saya tidak berpikir -yopsi tye diperlukan.
Tomáš Zato - Pasang kembali Monica
1
@ TomášZato -ydiperlukan jika Anda tidak ingin diminta dan / atau perlu menjalankan instalasi tanpa pengawasan.
Andrew
Hanya untuk menjelaskan tentang apa ini: devel menyertakan file header yang memungkinkan - seperti yang Anda katakan - kompilasi . Tetapi ini tidak termasuk perpustakaan itu sendiri; itu juga diperlukan untuk menghubungkan sebagai bagian dari proses pembangunan. Dalam beberapa distribusi setidaknya dan CentOS dan Fedora adalah dua contohnya mereka dibagi menjadi dua paket: -devel untuk dan yang lainnya akan bervariasi. Dan saya dapat menambahkan bahwa kesalahan dalam pertanyaan adalah kesalahan linker; jika file header tidak diinstal Anda tidak akan sampai sejauh itu. Lebih jauh lagi jika Anda melihat openssl-libs Anda akan menemukan file perpustakaan.
Pryftan
3

Masalah Anda sepertinya curltidak dikompilasi dengan openssldukungan. Anda dapat mengonfirmasi dengan memeriksa untuk melihat protokol apa yang curldidukung.

Contoh

Dari sistem saya.

$ lsb_release -r
Release:    6.5

Info versi 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 

Defaultnya openssladalah pada versi ini:

$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
slm
sumber
sistem tambang menunjukkan hal yang sama, tetapi apa solusinya?
AMB
@ AMB apakah Anda mendapatkan solusi untuk ini
vks
0

Jelas kesalahan itu karena mengikuti langkah-langkah berikut

make [2]: Meninggalkan direktori /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 '

Anda dapat memperbaiki kesalahan itu dengan mengkonfigurasi menggunakan perintah di bawah ini

./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
Dinusha Dilanka
sumber
-1

Saya juga mendapatkan kesalahan ini, dan ini memperbaikinya -

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