Symfony 炮口安装

Symfony 炮口安装,symfony,guzzle,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 r

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

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.
有什么想法吗

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


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

如果您使用的是symfony,最好通过捆绑包使用guzzle/guzzle

我建议您使用misd/guzzle捆绑包。因此,在composer.json上添加这一行

"misd/guzzle-bundle": "1.1.*@dev"
然后,更新您的捆绑包:

php composer.phar update 
您将获得guzzle/guzzle的最新版本

别忘了安装这个:

sudo apt-get install php5-curl