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