編譯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

  • pecl安裝程序時報錯Array and string offset access syntax with curly braces is no longer supported

  • PHP的換行符是什麽

  • 由於商家傳入的H5交易參數有誤,該筆交易暫時無法完成,請聯繫商家解決

我要說說
網上賓友點評