qq_22237055 2019-08-27 15:35
浏览 629

重新composer 后,使用是出现超时错误?

今天重装了composer,重装后使用时出现超时错误如下

qi@qi-ideacentre-AIO-300-23ISU:/var/www/html$ composer create-project --prefer-dist laravel/laravel blog


  [Composer\Downloader\TransportException]                                     
  The "https://repo.packagist.org/packages.json" file could not be downloaded  
  : failed to open stream: Connection timed out                                

使用过composer中国镜像,然而报错信息与之前一模一样。

运行环境如下
ubuntu 16.04.1
php 7.1
composer 1.9

composer config如下

[repositories.packagist.org.type] composer
[repositories.packagist.org.url] https://packagist.phpcomposer.com
[process-timeout] 300
[use-include-path] false
[preferred-install] auto
[notify-on-install] true
[github-protocols] [https, ssh]
[vendor-dir] vendor (/var/www/html/vendor)
[bin-dir] {$vendor-dir}/bin (/var/www/html/vendor/bin)
[cache-dir] /home/qi/.cache/composer
[data-dir] /home/qi/.local/share/composer
[cache-files-dir] {$cache-dir}/files (/home/qi/.cache/composer/files)
[cache-repo-dir] {$cache-dir}/repo (/home/qi/.cache/composer/repo)
[cache-vcs-dir] {$cache-dir}/vcs (/home/qi/.cache/composer/vcs)
[cache-ttl] 15552000
[cache-files-ttl] 15552000
[cache-files-maxsize] 300MiB (314572800)
[bin-compat] auto
[discard-changes] false
[autoloader-suffix] 
[sort-packages] false
[optimize-autoloader] false
[classmap-authoritative] false
[apcu-autoloader] false
[prepend-autoloader] true
[github-domains] [github.com]
[bitbucket-expose-hostname] true
[disable-tls] false
[secure-http] true
[cafile] 
[capath] 
[github-expose-hostname] true
[gitlab-domains] [gitlab.com]
[store-auths] prompt
[archive-format] tar
[archive-dir] .
[htaccess-protect] true
[use-github-api] true
[home] /home/qi/.config/composer

附加信息:报错信息中的https://repo.packagist.org/packages.json在我的浏览器上是能打开的,域名也能ping通

qi@qi-ideacentre-AIO-300-23ISU:/var/www/html$ ping repo.packagist.org
PING repo.packagist.org (54.38.136.239) 56(84) bytes of data.
64 bytes from ip-54-38-136.eu (54.38.136.239): icmp_seq=1 ttl=39 time=362 ms
64 bytes from ip-54-38-136.eu (54.38.136.239): icmp_seq=2 ttl=39 time=371 ms
64 bytes from ip-54-38-136.eu (54.38.136.239): icmp_seq=3 ttl=39 time=391 ms
64 bytes from ip-54-38-136.eu (54.38.136.239): icmp_seq=4 ttl=39 time=359 ms
^C
--- repo.packagist.org ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 4002ms
rtt min/avg/max/mdev = 359.543/371.305/391.974/12.752 ms
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器