編譯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.交流群: 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交易參數有誤,該筆交易暫時無法完成,請聯繫商家解決

我要說說
網上賓友點評