【问题标题】:Guzzle Installation喷口安装
【发布时间】:2015-01-07 03:22:36
【问题描述】:

我不确定为什么会出现此错误:

php composer.phar require guzzle/guzzle:~3.7

错误:

    ./composer.json has been updated
     Loading composer repositories with package information
     Updating dependencies (including require-dev)
     Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - guzzle/guzzle v3.8.1 requires ext-curl * -> the requested PHP extension curl is  missing from your system.
    - Installation request for guzzle/guzzle ~3.7 -> satisfiable by guzzle/guzzle[v3.7.0, v3.7.1, v3.7.2, v3.7.3, v3.7.4, v3.8.0, v3.8.1].


Installation failed, reverting ./composer.json to its original content.

有什么想法吗??!

【问题讨论】:

    标签: symfony guzzle


    【解决方案1】:

    guzzle/guzzle v3.8.1 需要 ext-curl * -> 您的系统中缺少请求的 PHP 扩展 curl

    只需安装cURL extension。在 Debian/Ubuntu 上:sudo apt-get install php5-curl。不要忘记重新启动您的 Web 服务器/PHP 进程。

    【讨论】:

      【解决方案2】:

      如果你正在使用 symfony,最好通过一个 bundle 使用 guzzle/guzzle。

      我建议您使用 misd/guzzle-bundle。所以,在你的 composer.json 中添加这一行

      "misd/guzzle-bundle": "1.1.*@dev"
      

      然后,更新您的捆绑包:

      php composer.phar update 
      

      您将获得 guzzle/guzzle 的最新版本。

      别忘了安装这个:

      sudo apt-get install php5-curl
      

      【讨论】:

        猜你喜欢
        • 2021-12-27
        • 2016-09-14
        • 1970-01-01
        • 2016-10-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-09-06
        • 2020-05-02
        相关资源
        最近更新 更多