moxuanyuan
V2EX  ›  PHP

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

  •  
  •   moxuanyuan · Jul 16, 2020 · 5626 views
    This topic created in 2317 days ago, the information mentioned may be changed or developed.
    10 replies  •  2020-08-28 12:13:49 +08:00
    airqj
    airqj
    Jul 16, 2020 via Android
    1
    走代理试试看
    moxuanyuan
    moxuanyuan
    OP
    Jul 16, 2020
    2
    @airqj #1 openwrt 中已经开了 v2,试过把 v2 停了也不行
    imnpc
    imnpc
    Jul 16, 2020
    3
    composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

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

    COMPOSER_PROCESS_TIMEOUT=4000 composer -vv create-project laravel/laravel --prefer-dist
    使用-vvv 查看详细的输出,使用 composer global require hirak/prestissimo 这个包来提速。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   935 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 21:52 · PVG 05:52 · LAX 13:52 · JFK 16:52
    ♥ Do have faith in what you're doing.