composer install提示Composer could not find the config file

我在安装fastadmin的时候,进行到composer install 这一步的时候,提示如下:

Composer could not find the config file: C:UsersAdministratorAppDataRoamingComposer
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

截图:

clipboard.png

我再去laravel项目中进行如上操作,仍然是同样的提示,应该和PHP的框架没关系;
系统windows 7 ,环境PHP7.2 ,composer的环境变量没毛病,因为composer -v 命令是正常的。

clipboard.png

以下方案我试过了
1-https://github.com/composer/w...
2-https://segmentfault.com/q/10...
3-https://segmentfault.com/q/10...

阅读 8.5k
2 个回答

windows系统的管理员权限不够,百度解决或者重装系统,尽量用win10

新手上路,请多包涵

我的是win10的,tp5.1,先说下情况,git分别下载两个包,发现没有autoload.php.只能还得安装composer(所以最好一开始就通过composer,不要通过git),下载了composer之后,composer -v 执行正常,但是在执行composer installde 时候总是报错D:phpStudyPHPTutorialWWWworkProjectOnetp5>composer install
Composer could not find the config file: D:phpStudyPHPTutorialphpphp-7.2.1-nts
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
我不知道为什么它的错总是指向phpphp-7.2文件里面,环境变量,ssh2, composer.json在tp5目录里面我也建立了。但是还报错

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏