dongling4383 2015-06-09 09:25 采纳率: 100%
浏览 178

网络很好,但无法在命令中创建laravel项目并显示错误

I used this command to create a new laravel project in the homestead:

composer create-project laravel/laravel Laravel

Then, the terminal show this error:

Failed to download laravel/laravel from dist: The "https://api.github.com/repos/laravel/laravel/zipball/7bddbdc2a1f8d9c23205707e74455d74684e3031" file could not be downloaded: failed to open stream: Connection timed out Now trying to download from source

I used curl command to get the content, failed again:

curl https://api.github.com/repos/laravel/laravel/zipball/7bddbdc2a1f8d9c23205707e74455d74684e3031

However, when I enter the address in the broswer(Firefox), it work! I can download the file by the browser!

Any help is greatly appreciated.

  • 写回答

1条回答 默认 最新

  • dpiw16824 2015-06-09 09:30
    关注

    This is probably the common issue about the reliability of the github downloads. It fails regularly.

    A workaround is to increase COMPOSER_PROCESS_TIMEOUT (defaults to 300) and force installing from source with the --prefer-source option:

    COMPOSER_PROCESS_TIMEOUT=2000
    
    composer create-project laravel/laravel Laravel --prefer-source
    
    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题