thrillerz

1 在CentOS上使用PHP的curl访问HTTPS页面时,出现错误“Protocol https not supported or disabled in libcurl”。

表示curl未启用https,需要重新编译php所使用的curl库。

cd curl-7.31.0
./configure --prefix=/home/www/thirdlib/curl --with-ssl=/ueidc/openssl

出现错误提示:

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!

是因为安装openssl时没启用shared选项,没有生成共享库

2 问题:

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

解决方式:

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

分类:

技术点:

相关文章:

  • 2021-09-28
  • 2021-08-05
  • 2021-06-18
  • 2021-12-04
  • 2022-01-07
  • 2021-10-03
  • 2021-07-22
  • 2022-01-11
猜你喜欢
  • 2021-12-07
  • 2021-11-24
  • 2022-01-08
  • 2021-12-19
  • 2021-11-17
  • 2021-08-11
相关资源
相似解决方案