Failed to initialize global composer: Composer could not find the config file: /x/x/composer/composer.json报错
具体情况:在/x/x/composer/composer.json下无composer.phar,无composer.json
1、现在那个报错提示目录安装composer.phar文件
curl -sS https://getcomposer.org/installer | php
2、初始化或自建composer.json文件
composer init
3、去看看是否还会报错
还有可能是composer.json文件配置错误等问题,检查下php版本有没有问题。
可直接更新一下
composer update
Linux安装tp5、laravel等框架出现Composer could not find the config file解决方法一:
https://blog.csdn.net/qq_38243612/article/details/103941316