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-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
基础教程推荐
- 如何替换eregi() 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
