2011-03-08 6 views
1

perl 모듈 Crypt-SSLeay를 사용해야하는 웹 응용 프로그램을 만들고 있습니다. 이 모듈은 OpenSSL 헤더를 필요로하는 의존성이 있습니다. 필자의 Linux 서버에는 설치 단계가 없기 때문에 제한된 경험으로 인해 이해하기 어려운 오류 (아래 참조)가 나타납니다.Crypt-SSLeay 모듈을 설치할 수 없습니다.

서버 정보 : 오라클 엔터프라이즈 리눅스
리눅스 버전 2.6.18-194.11.4.0.1.el5 ([email protected]) (GCC 버전 4.1.2 20080704 (레드햇 실행 4.1.2-48))

단계 문제를 복제 :
다운로드 및

./config --openssldir=/usr/local/openssl 
make 
make test 
sudo make install 

를 다운로드 및 추출) 디렉토리로 이동 한 후 (다음 명령을 here에서하려면 openssl 0.9.8r을 추출 및 실행 Crypt-SSLeay 모듈

BUILD INFORMATION 
================================================ 
ssl library: OpenSSL 0.9.8r in /usr/local/openssl 
ssl header: openssl/ssl.h 
libraries: -L/usr/local/openssl/lib -lssl -lcrypto -lgcc 
include dir: -I/usr/local/openssl/include 
================================================ 
Note (probably harmless): No library found for -lgcc 
Writing Makefile for Crypt::SSLeay 
The test suite can attempt to connect to public servers 
to ensure that the code is working properly. If you are 
behind a strict firewall or have no network connectivity, 
these tests may fail (through no fault of the code). 
Do you want to run the live tests (y/N)? [N] 
-bash-3.2$ make 
gcc -c -I/usr/local/openssl/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"0.58\" -DXS_VERSION=\"0.58\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" SSLeay.c 
SSLeay.c: In function ‘XS_Crypt__SSLeay__CTX_new’: 
SSLeay.c:118: warning: unused variable ‘packname’ 
SSLeay.c: In function ‘XS_Crypt__SSLeay__Conn_new’: 
SSLeay.c:395: warning: unused variable ‘packname’ 
SSLeay.c: In function ‘XS_Crypt__SSLeay__CTX_use_pkcs12_file’: 
SSLeay.c:287: warning: ‘RETVAL’ may be used uninitialized in this function 
Running Mkbootstrap for Crypt::SSLeay() 
chmod 644 SSLeay.bs 
rm -f blib/arch/auto/Crypt/SSLeay/SSLeay.so 
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic SSLeay.o -o blib/arch/auto/Crypt/SSLeay/SSLeay.so  \ 
     -L/usr/local/openssl/lib -lssl -lcrypto  \ 

/usr/bin/ld: /usr/local/openssl/lib/libssl.a(s2_clnt.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC 
/usr/local/openssl/lib/libssl.a: could not read symbols: Bad value 
collect2: ld returned 1 exit status 
make: *** [blib/arch/auto/Crypt/SSLeay/SSLeay.so] Error 1 

내가 필요한 것을 확실하지 않다 : 나는 "make"를 실행 한 후 다음 here에서 전자가 나는 다음과 같은 오류가 발생

perl Makefile.PL 
make 

(디렉토리로 이동 한 후) 다음 명령을 실행 이 모듈을 작동 시키려면 OpenSSL을 다시 컴파일해야합니다. 어떤 도움을 주셔서 감사합니다.

답변

2

OpenSSL 빌드 자체에 오류가있는 것 같습니다. 배포본이 OpenSSL 헤더를 제공하지 않는다고 확신합니까? (그리고 이미 라이브러리를 가지고있을 것입니다.)

헤더가 RedHat IIRC에서 "openssl-devel"패키지에 있고, Oracle Enterprise Linux에서 동일해야합니다.).

배포판의 패키지에서 헤더를 찾은 경우 사용자 정의 빌드를 제거하는 것을 잊지 마십시오 (OpenSSL Makefile에 제거 대상이없는 경우 수동으로 파일을 제거하십시오).

+3

내가 무엇을 놓쳤는 지 알아 냈습니다. 나는 'sudo yum install openssl-devel'명령을 사용했을 때 OpenSSL을 컴파일하고 있었다. 모든 것이 지금 작동 중입니다. 감사! – arcdegree

+0

다행스럽게 생각합니다. 사용자 정의 컴파일 된 openssl 라이브러리를 제거하는 것을 잊지 마십시오. 그들은 아무것도 해를 끼치 지 않아도되지만 반 기능적 보안 라이브러리를 사용하는 것은 보안 담당자가 "모범 사례"로 간주하지 않습니다. – Mat

관련 문제