我如何修补"您的要求无法解析为一组可安装的软件包"

时间:2017-03-23 10:37:08

标签: php symfony composer-php

我尝试克隆并安装此存储库 OCPlatform我创建了一个名为symfoni的数据库,并重命名了文件parameters.yml并更新如下:

parameters:
database_driver:   pdo_mysql
database_host:     127.0.0.1
database_port:     ~
database_name:     symfoni
database_user:     symfoni
database_password: symfoni

mailer_transport:  smtp
mailer_host:       127.0.0.1
mailer_user:       ~
mailer_password:   ~

locale:            en
secret:            ThisIsAChangedSecret

debug_toolbar:          true
debug_redirects:        false
use_assetic_controller: true

但是当我尝试命令行时

> php composer.phar install

,当我使用此命令时,会产生错误:

    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 symfony/icu v1.2.2 -> satisfiable by symfony/icu[v1.2.2].
    - symfony/icu v1.2.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
  Problem 2
    - symfony/icu v1.2.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - symfony/symfony v2.5.3 requires symfony/icu ~1.0 -> satisfiable by symfony/icu[v1.2.2].
    - Installation request for symfony/symfony v2.5.3 -> satisfiable by symfony/symfony[v2.5.3].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

如何修补此错误?

提前致谢

1 个答案:

答案 0 :(得分:1)

它需要php扩展intl 系统中缺少所请求的PHP扩展名。

尝试安装它并重启服务(php,apache ..):

#for centos, rhel
yum install php-intl

#for debian, ubuntu
apt-get install php-intl