安装 Symfony 2.4.1 lib-icu 4.4 依赖项时出现问题 [英] Problems installing Symfony 2.4.1 lib-icu 4.4 dependency

查看:41
本文介绍了安装 Symfony 2.4.1 lib-icu 4.4 依赖项时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了与 这个,但是那里提供的解决方案对我不起作用.

I'm having a problem identical to this one, but the solution provided there isn't working for me.

我从 Symfony 下载页面下载了 Symfony 2.4.1 Standard Vendors with Vendors 包.提取文件并下载 composer.phar 后,我运行 php composer.phar install 并收到此错误:

I downloaded the Symfony 2.4.1 Standard Vendors with Vendors package from the Symfony Downloads Page. After extracting the files and downloading composer.phar, I run php composer.phar install and get this error:

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
    - symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
    - symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
    - Installation request for symfony/icu v1.2.0 -> satisfiable by symfony/icu[v1.2.0].

按照上面链接的线程上的说明,我更新了 PEAR 库并执行了 sudo pear install pecl/intl.(这是在 CentOS 上,所以我没有遵循 MAMP 的内容).这不起作用,我意识到我必须执行 sudo yum install libicu.在此之后,sudo pear install pecl/intl 起作用了,我编辑了 php.ini 以添加 extension=intl.so 行,然后重新启动Apache 服务器.

Following the instructions on the thread linked to above, I updated PEAR libraries and did sudo pear install pecl/intl. (This is on CentOS so I didn't follow the MAMP stuff). This didn't work and I realized I had to do a sudo yum install libicu. After this, sudo pear install pecl/intl worked, and I edited php.ini to add the extension=intl.so line and then restarted the Apache server.

但我仍然遇到与上述相同的错误,此外,每当我运行 PHP 时,它都会发出警告:

But I'm still getting the same error as above, and in addition, any time I run PHP it gives the warning:

PHP Warning:  Module 'intl' already loaded in Unknown on line 0

查看phpinfo()的输出,我看到安装的intl版本是1.1.0,ICU版本是4.2.1(这就解释了为什么Symfony抱怨它需要 4.4).但是当我做 /usr/bin/pecl install intl 它说

Looking at the output of phpinfo() I see that the installed intl version is 1.1.0, and the ICU version is 4.2.1 (which explains why Symfony is complaining that it needs 4.4). But when I do /usr/bin/pecl install intl it says

pecl/intl is already installed and is the same as the released version 3.0.0

sudo yum install libicu 应该已经安装了最新版本.

And the sudo yum install libicu should have installed the latest version.

有什么办法可以拿到4.4版本吗?

Is there any way to get the 4.4 version?

推荐答案

对于你的具体情况,你应该在你的 composer.json 文件中指定你要使用 "symfony/icu": "1.1.*"

For your specific situation, you should specify in your composer.json file that you want to use "symfony/icu": "1.1.*"

请参阅此页面的ICU 和部署问题"部分:https://symfony.com/doc/2.4/components/intl.html

See the "ICU and Deployment Problems" section of this page: https://symfony.com/doc/2.4/components/intl.html

这篇关于安装 Symfony 2.4.1 lib-icu 4.4 依赖项时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆