web-dev-qa-db-ja.com

CentOS 6.5へのOpenSSL共有ライブラリのインストール

OS: CentOS-6.5-x86_64-minimal

OpenSSL の最新バージョンをダウンロードしました

tar -xvzf openssl-1.0.1e.tar.gzで抽出しました

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

次のエラーが表示されます。

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

yum -y install opensslを試しました。

OpenSSLをインストールして、CURLのHTTPSプロトコルとさまざまなアプリケーションを使用できるようにしたいと考えています。

openssl(バイナリ)はインストールされていますが、OpenSSL(HTTPSプロトコルに必要なものはインストールされていません)。

この問題の解決策はありますか?

11
Michael harris

OpenSSLをサポートしてTomcatをコンパイルしたかったのですが、OpenSSLのソースコードだけでは不十分でした。 OpenSSL開発ライブラリをインストールしてみてください。

yum install -y openssl-devel
29
Andrew

curlopensslサポート付きでコンパイルされていないようです。 curlがサポートするプロトコルを確認することで確認できます。

私のシステムから。

$ lsb_release -r
Release:    6.5

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 

デフォルトのopensslは次のバージョンです。

$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
3
slm

次のメイク手順によるエラーは明らかです

make [2]:ディレクトリを残しています/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 '

あなたはbellowコマンドを使用して設定することでそのエラーを修正することができます

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