douzhuanqian8244 2019-05-25 19:25 采纳率: 100%
浏览 507
已采纳

为什么centos curl版本与php curl版本不同

I updated centos7 curl and now the version is 7.65, then I rebuilt php7 and set --with-curl=/usr/bin/curl. When I finished curl_version() still shows 7.20. Why is that?

I use guzzle to request a web which need http_version 2.0, so I have to upgrade php curl. Hope someone helps me, thanks a lot!

  • 写回答

1条回答 默认 最新

  • douji4948 2019-05-25 22:05
    关注

    You have to update libcurl and use the installation path as compile option --with-curl=/path/to/libcurl

    To do so follow the next steps:

    As described here:

    1. install curl-config
    2. find the path of libcurl with curl-config --cflags
    3. use curl-config --version to determine the libcurl version
    4. if it is not the version you expect, rebuild curl with the --includedir option
    5. rebuild php with the option --with-curl=/path/to/libcurl
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

    报告相同问题?

    悬赏问题

    • ¥60 关于海信电视聚好看安装应用的问题
    • ¥15 vue引入sdk后的回调问题
    • ¥15 求一个智能家居控制的代码
    • ¥15 ad软件 pcb布线pcb规则约束编辑器where the object matpcb布线pcb规则约束编辑器where the object matchs怎么没有+15v只有no net
    • ¥15 虚拟机vmnet8 nat模式可以ping通主机,主机也能ping通虚拟机,但是vmnet8一直未识别怎么解决,其次诊断结果就是默认网关不可用
    • ¥20 求各位能用我能理解的话回答超级简单的一些问题
    • ¥15 yolov5双目识别输出坐标代码报错
    • ¥15 这个代码有什么语法错误
    • ¥15 给予STM32按键中断与串口通信
    • ¥15 使用QT实现can通信