首页 文章

Laravel 4:Windows 8 XAMPP / WAMP上的安装错误

提问于
浏览
2

我正在尝试安装Laravel 4,但我一直在设置这个错误 . 如果您对如何解决它有任何提示,我将非常感谢您的帮助 .

这是希望我到目前为止尝试过

  • 启用php扩展: php_openssl, php_curl, php_socket

  • 在Apache模块中,已启用 ssl_module

  • 在我所有的php.ini文件中 openssl

  • 禁用防火墙


我的配置:

  • Windows 8

  • 使用Git Bash

  • 尝试了两个XAMPP / WAMPP,我得到了同样的错误

  • 已安装Composer

$ composer create-project laravel/laravel project-v1 --prefer-dist

  [Composer\Downloader\TransportException]
  The "http://packagist.org/p/laravel/laravel$cfb9a31046c5c103d3b5e46a51b5a18
  a629de734f094f489e2b7df1420078c17.json" file could not be downloaded: send
  of 103 bytes failed with errno=10053 An established connection was aborted
  by the software in your host machine.

  send of 21 bytes failed with errno=10053 An established connection was abor
  ted by the software in your host machine.

  send of 113 bytes failed with errno=10053 An established connection was abo
  rted by the software in your host machine.

  send of 2 bytes failed with errno=10053 An established connection was abort
  ed by the software in your host machine.

  send of 2 bytes failed with errno=10053 An established connection was abort
  ed by the software in your host machine.

  failed to open stream: HTTP request failed!



create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repos
itory-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--n
o-scripts] [--no-progress] [--keep-vcs] [--no-install] [package] [directory] [ve
rsion]

2 回答

  • 1

    首先,如果您正在运行Web过滤器,尤其是K9 Web Protection,请先卸载它,然后重试 . 如果问题仍然存在,请提前阅读:

    问题是,在向服务器发出第一个https请求后,Composer会降级为http请求 . 这样做是为了提高性能/速度,并通过sha256哈希确保文件完整性/安全性 . 在任何情况下,这将导致10053错误(errno = 10053已 Build 的连接被主机上的软件中止...无法打开流:HTTP请求失败!)在某些计算机上 .

    这种情况发生在一些人而不是其他人的原因似乎是您的ISP处理http请求的方式 . 就我而言,它们与Composer制作其http请求的方式相得益彰 . 这就是发生在我身上的事 - 其他人可能有不同的原因 . 无论如何,修复方法是强制Composer使用https请求而不是http请求:

    将以下内容添加到Composer安装的配置文件(composer.json)中 . 在Windows中,您可以在C:\ Users \ AppData \ Roaming \ Composer中找到此文件 .

    "repositories": [
    {
        "packagist": false
    },
    {
        "type": "composer",
        "url": "https://packagist.org/"
    }
    ],
    

    然后继续按照您的尝试再次创建项目 . 它现在应该工作 .

  • 8

    看起来您在本地计算机上运行某种阻止连接以下载所需文件的防火墙 .

    您将需要随机播放任何安全程序并检查是否有任何阻止它 .

相关问题