喷嘴安装

时间:2014-03-10 17:35:58

标签: symfony guzzle

我不确定为什么我会收到此错误:

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.

任何想法??!

2 个答案:

答案 0 :(得分:4)

  

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

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

答案 1 :(得分:1)

如果您使用symfony,最好使用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