V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
moxuanyuan
V2EX  ›  PHP

composer 一直卡在 Updating dependencies (including require-dev)

  •  
  •   moxuanyuan · 2020-07-16 12:29:43 +08:00 · 4367 次点击
    这是一个创建于 1352 天前的主题,其中的信息可能已经有所发展或是发生改变。
    10 条回复    2020-08-28 12:13:49 +08:00
    airqj
        1
    airqj  
       2020-07-16 12:46:55 +08:00 via Android
    走代理试试看
    moxuanyuan
        2
    moxuanyuan  
    OP
       2020-07-16 12:54:55 +08:00
    @airqj #1 openwrt 中已经开了 v2,试过把 v2 停了也不行
    imnpc
        3
    imnpc  
       2020-07-16 13:44:14 +08:00
    composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

    我在 macOS + Homestead (基于 Ubuntu )和 CentOS7 中使用的这个执行以后没问题
    meshell
        4
    meshell  
       2020-07-16 14:34:57 +08:00
    等久点就行了。
    toxicant
        5
    toxicant  
       2020-07-16 15:09:59 +08:00
    每次 install or require 都是玄学,我都是看运气,运气好一瞬间,运气不好一上午[doge]
    IceBay
        6
    IceBay  
       2020-07-16 15:29:40 +08:00
    后边加个 -vvv,看看是卡在哪里了
    fxjson
        7
    fxjson  
       2020-07-17 08:28:28 +08:00
    换一个源
    pinews
        8
    pinews  
       2020-07-20 11:01:30 +08:00
    @moxuanyuan
    @meshell
    用国外的服务器吧,弄好了打个包在放在国内的服务器上
    moxuanyuan
        9
    moxuanyuan  
    OP
       2020-07-20 11:48:56 +08:00
    @fxjson #7 换了也一样
    konakona
        10
    konakona  
       2020-08-28 12:13:49 +08:00
    这个问题我专门分析过,现在一个 laravel 项目可能有 100 个包。
    而且有些巨大的包,超时时间非常建议调宽。

    COMPOSER_PROCESS_TIMEOUT=4000 composer -vv create-project laravel/laravel --prefer-dist
    使用-vvv 查看详细的输出,使用 composer global require hirak/prestissimo 这个包来提速。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5418 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:00 · PVG 17:00 · LAX 02:00 · JFK 05:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.