Solve the error when installing SSL for curl on centos6.5

Source: Internet
Author: User

1. When you use PHP curl on centos to access the HTTPS page, the error "protocol HTTPS not supported or disabled in libcurl" is displayed ".

It indicates that the curl library used by PHP needs to be re-compiled because HTTPS is not enabled for curl.

CD curl-7.31.0
./Configure -- prefix =/home/www/thirdlib/curl -- With-SSL =/ueidc/OpenSSL

Error message:

Checking for ssl_connect in-lssl... no
Checking for SSL with rsaglue/rsaref libs in use... checking for ssl_connect in-lssl... (cached) No
Configure: Error: OpenSSL libs and/or directories were not found where specified!

This is because the shared option is not enabled when OpenSSL is installed and no shared library is generated.

2. Problem:

/Usr/bin/ld: Warning: libcrypto. so.1.0.0, needed by ../lib/. libs/libcurl. So, not found (try using-rpath or-rpath-link)

Solution:

Env ldflags =-r/home/www/thirdlib/OpenSSL/lib. /configure -- prefix =/home/www/thirdlib/curl -- With-SSL =/home/www/thirdlib/OpenSSL

3./configure -- With-PHP-Config =/home/www/PHP/bin/PHP-config -- With-curl =/home/www/thirdlib/curl

Solve the error when installing SSL for curl on centos6.5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.