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

为什么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!

图片转代码服务由CSDN问答提供 功能建议

我更新了centos7 curl,现在版本是7.65,然后我重建了php7和 set --with- 卷曲=的/ usr /斌/卷曲。 当我完成 curl_version()仍显示7.20。 为什么会这样?

我使用guzzle来请求一个需要http_version 2.0的网页,所以我必须升级php curl。 希望有人帮助我,非常感谢!

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

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
    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题