Instalando bibliotecas compartilhadas OpenSSL no CentOS 6.5


11
OS: CentOS-6.5-x86_64-minimal

Baixei a versão mais recente do OpenSSL

Extraído com tar -xvzf openssl-1.0.1e.tar.gz

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

isso me dá o seguinte erro:

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

Eu tentei yum -y install openssl.

Desejo instalar o OpenSSL para poder usar o protocolo HTTPS no CURL e em diferentes aplicativos.

openssl (que é o binário) está instalado, mas o OpenSSL (que é necessário para o protocolo HTTPS não está instalado).

Alguma solução para este problema?


Está faltando a parte boa desse erro. Parece que pode haver vários símbolos, mas é difícil distinguir o que você postou.
quer

Atualizado o post
Michael harris

Respostas:


29

Eu queria compilar o tomcat com suporte ao OpenSSL e o código-fonte do OpenSSL por si só não era suficiente. Tente instalar as bibliotecas de desenvolvimento OpenSSL:

yum install -y openssl-devel

Eu não acho que a -yopção tye seja necessária.
Tomáš Zato - Restabelece Monica

1
O @ TomášZato -yé necessário se você não desejar ser solicitado e / ou precisar executar a instalação autônoma.
28817 Andrew Andrew

Apenas para explicar do que se trata: o devel inclui os arquivos de cabeçalho que permitem - como você diz - compilar . Mas isso não inclui as próprias bibliotecas; isso também é necessário para vincular como parte do processo de construção. Em algumas distribuições, pelo menos, e o CentOS e o Fedora são dois, por exemplo, eles estão divididos em dois pacotes: -devel for e o outro variará. E devo acrescentar que os erros na questão são erros de vinculação; se os arquivos de cabeçalho não estivessem instalados, você não chegaria tão longe. Além disso, se você olhar o openssl-libs, encontrará os arquivos da biblioteca.
Pryftan

3

Parece que seu problema curlnão foi compilado com opensslsuporte. Você pode confirmar verificando quais protocolos curlsuportam.

Exemplo

Do meu sistema.

$ lsb_release -r
Release:    6.5

Informações da versão do 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 

O padrão opensslé nesta versão:

$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

meu sistema mostra o mesmo, mas qual é a solução?
AMB

@AMB você conseguiu alguma solução para isso
VKS

0

É claro que esse erro, devido às etapas a seguir

make [2]: Deixando o diretório /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 '

você pode corrigir esse erro configurando usando o comando abaixo

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

-1

Eu também recebi esse erro, e isso foi corrigido -

./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.