최신 openssl로 컬을 구축하는 방법은 무엇입니까?

최신 openssl로 컬을 구축하는 방법은 무엇입니까?

그래서 openssl을 빌드합니다.

./config
make
sudo make install
sudo ln -sf /usr/local/ssl/bin/openssl `which openssl`

나는 컬을 만든다

./configure --with-ssl 
make
make install

OpenSSL이 올바르게 설치된 것 같습니다.

openssl version
OpenSSL 1.0.1g 7 Apr 2014

그러나 컬은 이전 openssl 버전(1.0.1g 대신 1.0.1f)을 사용합니다.

curl --version
curl 7.37.0 (x86_64-unknown-linux-gnu) libcurl/7.37.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 libssh2/1.4.3 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp 
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP 

컬을 새 버전으로 사용하는 방법은 무엇입니까?

이상한 openssl/curl 버그와 싸우고 있기 때문에 최신 버전을 사용해 보고 싶습니다.#1 #2

편집: 나도 시도했지만 ./configure --with-ssl=/usr/local/ssl/include/openssl성공하지 못했습니다.

Edit2: 지금까지 나는 또한 다음을 시도했습니다.

  • sudo ./configure --with-ssl --with-libssl-prefix=/usr/local/ssl
  • ./configure --with-ssl=/usr/local/ssl
  • PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ./configure
  • PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ./configure --with-ssl
  • PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ./configure --with-ssl=/usr/local/ssl/include/openssl

성공하지 못해...

답변1

OpenSSL이 설치된 디렉터리를 지정해야 합니다(심볼릭 링크는 필요하지도 충분하지도 않습니다).

./configure --with-ssl=/usr/local/ssl

편집: 또는 PKG_CONFIG_PATH환경 변수를 설정할 수 있습니다(에서 제안한 대로 ./configure --help).

PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ./configure

답변2

sudo apt-get install libssl-dev
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
sudo make
sudo make install

우분투 15.04에서 컬 7.43을 빌드하는 데 필요한 전부입니까?

답변3

동일한 연습을 진행하면서 내가 발견한 것은 컬이 openssl 정적 라이브러리와 함께 작동할 수 없다는 것입니다. 내가 무엇을 하든 항상 역동적인 것을 추구했기 때문에 결국 나에게 도움이 되는 세 가지 일을 했습니다.

Configured openssl with enable-shared: ./config enable-shared
Configured curl with openssl: ./configure --with-ssl
Used LD_LIBRARY_PATH: LD_LIBRARY_PATH=/usr/local/lib:/usr/local/ssl/lib /usr/local/bin/curl -V

-V 플래그가 있는 후자의 명령은 컬이 사용하는 openssl 버전을 표시합니다. 컬이 올바른 libcurl 버전을 사용하는지 확인하기 위해 /usr/local/lib를 LD_LIBRARY_PATH에 추가했습니다.

답변4

./configure --with-ssl=/usr/lib/ssl --libdir=/usr/lib/x86_64-linux-gnu
sudo make
sudo make install

몇 시간 동안 어려움을 겪은 후 우분투 15.05에서 libcurl 7.38을 사용하여 https를 활성화했습니다.

관련 정보