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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算
    • ¥15 java如何提取出pdf里的文字?