编译php时错误Please reinstall the libcurl distribution

字号+ 编辑: 种花家 修订: 种花家 来源: 原创 2024-09-09 我要说两句(0)

编译老版本php时候遇到一个错误,查了网上找不到解决方案,于是用了新建快捷方式的办法解决的

因为运行php的configure命令时,我加了--with-curl, 程序在里面找默认路径,找不到可编译用的eash.h文件,显示了以下错误:

checking for cURL support... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/

网上说要用apt-get重新安装一下libcurl4,安装了半天没什么卵用

apt-get install libcurl4-openssl-dev libcurl4-gnutls-dev

于是用find命令找了一下easy.h这个文件的位置

find / -name "easy.h"

发现结果是/usr/include/x86_64-linux-gnu/curl/easy.h

服务器是debian系统,这样一来用下列方法解决:

cd /usr/include
ln -s x86_64-linux-gnu/curl

再次运行php configure发现搞定了。

阅完此文,您的感想如何?
  • 有用

    179

  • 没用

    4

  • 开心

    22

  • 愤怒

    6

  • 可怜

    5

1.如文章侵犯了您的版权,请发邮件通知本站,该文章将在24小时内删除;
2.本站标注原创的文章,转发时烦请注明来源;
3.Q群: 2702237 13835667

相关课文
  • mac开发接入微信公众号接口返回报错 cURL error 56: SSLRead() return error -9806

  • PHP的换行符是什么

  • pecl安装程序时报错Array and string offset access syntax with curly braces is no longer supported

  • 由于商家传入的H5交易参数有误,该笔交易暂时无法完成,请联系商家解决

我要说说
网上嘉宾点评