【问题标题】:Laravel Installation Error: [ErrorException] file_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptorLaravel 安装错误:[ErrorException] file_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor
【发布时间】:2020-12-04 23:46:03
【问题描述】:

我正在一台新的 PC 上设置 Laravel 开发环境,并且一切都安装正确,即 XAMPP、NODE JS 和 Composer。但是,当我尝试通过 Laravel 安装程序或 composer 安装 Laravel 时,我收到一条错误消息: [ErrorException] file_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor。我试图在 StackOverflow 上搜索答案,但只有一个选项,但它对我不起作用。有人愿意帮我找出问题所在吗?先感谢您。 (Laravel 版本 7)。

【问题讨论】:

  • 使用php 7.4的最新版本,我猜2.1.0版本解决了

标签: php laravel


【解决方案1】:

我做了一个快速搜索,似乎它是 PHP 7.4 中的一个错误,应该在 PHP 7.3 中运行良好。 https://bugs.php.net/bug.php?id=79166

您使用的是哪个版本?,您可以使用phpinfo(); 或此Find PHP version on windows command line 进行检查

【讨论】:

  • 我已经这样做了,错误消失了,但是当我尝试运行 php artisan serve 时,我再次收到此错误 PHP Warning: require(C:\xampp\htdocs\projects\freelance\rivala0/vendor/autoload.php): failed to open stream: No such fi le or directory in C:\xampp\htdocs\projects\freelance\rivala0\artisan on line 18 但即使在执行 composer install 之后,我也会收到同样的错误!
  • 使用 composer install,然后是 composer dump-autoload
  • @bhucho 答案应该可以。如果不是,我建议删除供应商文件夹并删除 composer.lock 文件并再次安装作曲家。
  • @JiteshDhamaniya 删除作曲家锁定文件和供应商文件夹效果很好!非常感谢!
  • 很高兴能帮上忙 :)
【解决方案2】:

使用PHP版本7.3.28或以下,100%正常工作。

【讨论】:

    猜你喜欢
    • 2021-02-18
    • 2021-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多