沃梦达 / 编程问答 / php问题 / 正文

Composer 找不到 composer.json

Composer could not find a composer.json(Composer 找不到 composer.json)

本文介绍了Composer 找不到 composer.json的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过 brew per 安装 composer:

I tried to install composer via brew per:

usr/local/bin 中(不在 Mavricks 上,我必须亲自制作)我做到了.

In usr/local/bin (which was not on Mavricks and I had to make personally) I did.

brew tap josegonzalez/homebrew-phpbrew install josegonzalez/php/composer

我可以运行 php composer.phar,但是当我执行 php composer.phar install 时,我得到了错误:

I can run php composer.phar, but when I do php composer.phar install, I get the error:

Composer 在/usr/local/bin 中找不到 composer.json 文件要初始化项目,请按照 http://getcomposer.org/入门"部分中的说明创建一个 composer.json 文件

所以我去了 https://getcomposer.org/doc/00-intro.md.CTRL+F ".json" 什么都没有.认真的作曲家?

So I go to the https://getcomposer.org/doc/00-intro.md. CTRL+F ".json" and nothing's there. Seriously composer?

我想做的是让 composer 可执行 vs php composer.phar.从现在开始,这在这一点上起作用.

What I was trying to do was to have composer executable vs php composer.phar. This works at this point from this now.

推荐答案

Getting Started"页面是文档的介绍.大多数文档都会从安装说明开始,就像 Composer 所做的那样.

The "Getting Started" page is the introduction to the documentation. Most documentation will start off with installation instructions, just like Composer's do.

包含 composer.json 文件信息的页面是 位于此处 - 在基本用法"下,第二页.

The page that contains information on the composer.json file is located here - under "Basic Usage", the second page.

我建议您完整阅读文档,以便更好地了解如何使用 Composer.我还建议删除您拥有的内容并按照文档中提供的安装说明进行操作.

I'd recommend reading over the documentation in full, so that you gain a better understanding of how to use Composer. I'd also recommend removing what you have and following the installation instructions provided in the documentation.

这篇关于Composer 找不到 composer.json的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Composer 找不到 composer.json

基础教程推荐