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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 YOLO检测微调结果p为1
  • ¥20 求快手直播间榜单匿名采集ID用户名简单能学会的
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题