Composer could not find a 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-php
brew 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
基础教程推荐
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- 在多维数组中查找最大值 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01