【问题标题】:How to upgrade php cURL to version 7.36.0?如何将 php cURL 升级到 7.36.0 版本?
【发布时间】:2015-04-14 05:59:32
【问题描述】:

我的 CentOS 服务器上有 php curl 7.19.7,但我需要升级到 7.36.0。

我试过了:

yum update php-curl

但我得到了:

Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirror.t-home.mk
Setting up Update Process
No Packages marked for Update

【问题讨论】:

标签: php linux curl centos


【解决方案1】:

使用city-fan repo(部分卷发镜http://curl.haxx.se/download.html#LinuxRedhat

rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-2-1.rhel6.noarch.rpm
yum install libcurl

您可以查看最新版本here

目前这会将 curl 从 7.19 更新到 7.40

【讨论】:

  • 仅供参考 - 这不会更新 PHP 已经使用的 cURL 版本。
  • @Meezaan-ud-Din 也许对其他人有用,你必须重新启动 php(apache 等)才能让 php 使用更新后的 curl
  • city-fan repo 提供了最新版本,但不幸的是,它们并不总是在启用最新 curl 选项的情况下编译 $ rpm -q curl curl-7.52.1-1.0.cf.rhel7.x86_64 $ curl -I --dns-interface ppp2 stackoverflow.com curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
  • The requested URL returned error: 404 Not Found error: skipping http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm - transfer failed 现在怎么办? :)
  • 更新了一个新包的答案,试一试,告诉我进展如何
【解决方案2】:

你可以试试这个,它在 RHEL7 上对我有用

  1. 创建一个新文件 /etc/yum.repos.d/city-fan.repo
  2. 粘贴进去:

    [城市迷] 名称=城市粉丝回购 baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel$releasever/$basearch/ 启用=1 gpgcheck=0
  3. 运行

    百胜清洁所有 百胜安装卷曲

【讨论】:

  • 我在数字海洋线程digitalocean.com/community/questions/… 上读到的是,您希望在 city-fan.repo 文件中设置 enabled=0 以便它不会成为未来升级的默认来源。您可以使用以下调用手动启用该站点:yum --enablerepo=city-fan.org update curl [credit: jamieburchell]
  • 如果想暂时启用上面的city-fan.repoenabled=0,那么命令应该是yum --enablerepo=CityFan update curl
【解决方案3】:

尝试以下命令:

curl-config --version
sudo rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-1-13.rhel6.noarch.rpm
sudo yum install libcurl

【讨论】:

    猜你喜欢
    • 2016-09-13
    • 2018-12-08
    • 2010-12-09
    • 2015-05-30
    • 2015-08-13
    • 2016-02-26
    • 2017-04-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多