2015-06-13 69 views
6

我决定学习symfony,所以我试图安装它。让作曲家像在网站上说,我执行以下命令来创建一个项目,并得到Symfony2的安装Symfony2

作曲家创建项目的symfony /框架标准版网站/测试

,不幸的是我得到这个的消息:

> Installing symfony/framework-standard-edition (v2.7.1) 
     - Installing symfony/framework-standard-edition (v2.7.1) 
     Downloading: 100%  

--- 


> Created project in Website/test 
    Loading composer repositories with package information 
    Installing dependencies (including require-dev) from lock file 
    Your requirements could not be resolved to an installable set of packages. 

**Problem 1** 


- Installation request for sensiolabs/security-checker v2.0.5 -> satisfiable by sensiolabs/security-checker[v2.0.5]. 

- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system. 

**Problem 2** 

- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system. 

- sensio/distribution-bundle v4.0.0 requires sensiolabs/security-checker ~2.0 -> satisfiable by sensiolabs/security-checker[v2.0.5]. 

- Installation request for sensio/distribution-bundle v4.0.0 -> satisfiable by sensio/distribution-bundle[v4.0.0]. 

的composer.json文件:

{ 
    "name": "symfony/framework-standard-edition", 
    "license": "MIT", 
    "type": "project", 
    "description": "The \"Symfony Standard Edition\" distribution", 
    "autoload": { 
     "psr-4": { "": "src/", "SymfonyStandard\\": "app/SymfonyStandard/" } 
    }, 
    "require": { 
     "php": ">=5.3.9", 
     "symfony/symfony": "2.7.*", 
     "doctrine/orm": "~2.2,>=2.2.3,<2.5", 
     "doctrine/dbal": "<2.5", 
     "doctrine/doctrine-bundle": "~1.4", 
     "symfony/assetic-bundle": "~2.3", 
     "symfony/swiftmailer-bundle": "~2.3", 
     "symfony/monolog-bundle": "~2.4", 
     "sensio/distribution-bundle": "~4.0", 
     "sensio/framework-extra-bundle": "~3.0,>=3.0.2", 
     "incenteev/composer-parameter-handler": "~2.0" 
    }, 
    "require-dev": { 
     "sensio/generator-bundle": "~2.3" 
    }, 
    "scripts": { 
     "post-root-package-install": [ 
      "SymfonyStandard\\Composer::hookRootPackageInstall" 
     ], 
     "post-install-cmd": [ 
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" 
     ], 
     "post-update-cmd": [ 
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles", 
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" 
     ] 
    }, 
    "config": { 
     "bin-dir": "bin" 
    }, 
    "extra": { 
     "symfony-app-dir": "app", 
     "symfony-web-dir": "web", 
     "symfony-assets-install": "relative", 
     "incenteev-parameters": { 
      "file": "app/config/parameters.yml" 
     }, 
     "branch-alias": { 
      "dev-master": "2.7-dev" 
     } 
    } 
} 

我得到了PHP 5.5.9版本和Ubuntu 14.04作为操作系统。

有人可以向我解释为什么我得到这些错误以及如何解决它们?

回答

8

根据您的错误,问题是您没有安装PHP cURL扩展。

在Ubuntu中,请尝试以下安装软件包

sudo apt-get install curl php5-curl

现在再次尝试。

+0

工作就像一个魅力,它是缺少卷曲的php5卷曲已经安装。谢谢你,先生! – Habchi

+0

不,这是错的。我卷曲安装正确。但仍然有问题 – Ruwantha

+0

好吧,这没有错。如果它不适合你,那么a)你错过了php5-curl位(我注意到你的评论只提到了cURL已经安装)或者b)你的环境设置不同,在这种情况下,你可能应该问一个特定于你的设置的新问题。 –