dongmi5607 2013-08-05 13:20
浏览 33
已采纳

Composer不会添加甚至下载添加的库

I have installed symfony very recently and it recommends me to get something called INTL extension...

I used Composer to install symfony after that I wanted to add that extension so I open composer.json in my folder and added symfony/intl like this

"require": {
    "symfony/intl": "2.3.*",
    "php": ">=5.3.3",
    "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"
},

and used Composer update which gives the following

******* path # composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Updating the "app/config/parameters.yml" file.
Clearing the cache for the dev environment with debug true
Installing assets using the hard copy option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for Acme\DemoBundle into web/bundles/acmedemo
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodi

which means composer didn't download the lib I removed the Composer.lock file and ran Composer Install and also composer require still nothing....

but interesting thing is when I go to an empty folder and used "composer require" it worked and downloaded the INTL ! I think the goal of composer is to add libs I want when I want them so
what's the problem ? Why I can't add new libs ??

  • 写回答

1条回答 默认 最新

  • duanhao9176 2013-08-05 14:36
    关注

    Composer said you should install the intl extension (ext-intl), then it means the php extension, not the symfony/intl (as it's limited to en only). You should remove the package and install the real extension. On debian based systems (Ubuntu, ...) it's the package php5-intl

    apt-get install php5-intl
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题
  • ¥20 RL+GNN解决人员排班问题时梯度消失
  • ¥60 要数控稳压电源测试数据
  • ¥15 能帮我写下这个编程吗
  • ¥15 ikuai客户端l2tp协议链接报终止15信号和无法将p.p.p6转换为我的l2tp线路