Composer安装插件报错:fclose(): Argument #1

jacknum1

问题描述

截图

报错信息

Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in phar://D:/Soft/Composer/composer.phar/vendor/symfony/process/Pipes/WindowsPipes.php:71

操作系统及workerman/webman等框架组件具体版本

  • 操作系统:windows10系统
  • PHP:8.0.2
  • workerman/webman-framework :1.4.10

    疑问

    是否是在安装依赖后导致Composer的包出现错误?不知道大佬们有遇到这种情况没?

已解决

如果遇到相似的问题建议先升级Composer:composer self-update, 实在不行再进行卸载操作!

1、删除Composer

> where composer
C:\Users\Administrator\AppData\Local\ComposerSetup\bin\composer
C:\Users\Administrator\AppData\Local\ComposerSetup\bin\composer.bat

> del C:\Users\Administrator\AppData\Local\ComposerSetup\bin\composer
> del C:\Users\Administrator\AppData\Local\ComposerSetup\bin\composer.bat

2、重新安装Composer

78 0 0
0个回答

🔝