尝试在安装了icu 4.2.1的Centos 6中安装供应商

时间:2014-01-02 12:39:31

标签: symfony

由于我收到有关icu版本的错误消息在运行php composer.phar install时,我在下面添加了这一行here

"symfony/icu": "1.1.*",

所以我的composer.json是这样的:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/icu": "1.1.*",
        "symfony/symfony": "2.3.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.3.*",
        "symfony/swiftmailer-bundle": "2.3.*",
        "symfony/monolog-bundle": "2.3.*",
        "sensio/distribution-bundle": "2.3.*",
        "sensio/framework-extra-bundle": "2.3.*",
        "sensio/generator-bundle": "2.3.*",
        "incenteev/composer-parameter-handler": "~2.0",
        "ziiweb/frontendbundle": "@dev",
        "friendsofsymfony/user-bundle": "~2.0@dev",
        "sonata-project/admin-bundle": "dev-master",
        "sonata-project/core-bundle": "dev-master",
        "sonata-project/doctrine-orm-admin-bundle": "dev-master",
        "sonata-project/media-bundle": "dev-master"
    },
    "scripts": {
        "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"
        ],
        "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"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "minimum-stability": "stable",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.3-dev"
        }
    }
}

但是再次安装后,我收到了这个错误:

  Problem 1
    - The requested package symfony/icu could not be found in any version, there may be a typo in the package name.   Problem 2
    - Installation request for symfony/framework-standard-edition 2.3.x-dev -> satisfiable by symfony/framework-standard-edition[2.3.x-dev].
    - symfony/framework-standard-edition 2.3.x-dev requires symfony/icu 1.1.* -> no matching package found.   Problem 3
    - Installation request for symfony/symfony v2.3.8 -> satisfiable by symfony/symfony[v2.3.8].
    - symfony/symfony v2.3.8 requires symfony/icu ~1.0 -> no matching package found.   Problem 4
    - symfony/symfony v2.3.8 requires symfony/icu ~1.0 -> no matching package found.
    - sonata-project/media-bundle 2.2.x-dev requires symfony/symfony ~2.2 -> satisfiable by symfony/symfony[v2.3.8].
    - Installation request for sonata-project/media-bundle 2.2.x-dev -> satisfiable by sonata-project/media-bundle[2.2.x-dev].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting    see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details

3 个答案:

答案 0 :(得分:0)

"symfony/Icu"是大写字母

答案 1 :(得分:0)

  1. 您需要下载PHP的INTL扩展名。转到http://pecl.php.net/get/intl-3.0.0.tgz
  2. Tar该文件,并使用以下命令进行编译 tar zxvf intl-3.0.0.tgz
    cd intl-3.0.0
    在/ usr / bin中/ phpize
    ./configure --with-php-config = [你自己安装的PHP目录] / bin / php-config
  3. 更新您的php.ini。 延长= intl.so
  4. 重启你的php服务器 顺便说一下,如果在完成上述过程后问题仍然出现,请检查是否为PHP CLI安装了该扩展。你知道PHP和PHP CLI有时会有不同的php.ini文件。

答案 2 :(得分:0)

对我有用的是删除composer.lock文件,然后进行作曲家安装。

编辑:我还删除了供应商目录