运行Composer返回:“无法打开输入文件:composer.phar” [英] Running Composer returns: "Could not open input file: composer.phar"

查看:1298
本文介绍了运行Composer返回:“无法打开输入文件:composer.phar”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是symfony2的新手,并且阅读 symblog 。在第三章尝试使用数据夹具时,我尝试了命令:

I am new to symfony2 and reading symblog. In third chapter while trying with data-fixtures I tried the command:

php composer.phar update

但我遇到了错误:

无法打开输入文件:composer.phar

Could not open input file: composer.phar

所以我google了一下,尝试了

So I googled a little and tried

php composer.phar install

但仍会收到相同的错误。所以,请指导如何处理这个作曲家使用wamp在symfony2中安装新的扩展或数据包夹。

but still getting the same error. So please guide how to deal with this composer to install new extentions or bundles like data-fixtures in symfony2 using wamp.

推荐答案

您按照以下说明操作:

https://getcomposer.org /doc/00-intro.md

这会让您执行以下操作:

Which tell you to do the following:

$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer

像我一样,运行这些命令,没有阅读页面的下一部分,告诉您停止引用composer.phar的全名,并将其缩写为可执行文件(您刚刚使用mv命令重命名)。因此:

Then it's likely that you, like me, ran those commands and didn't read the next part of the page telling you to stop referring to composer.phar by its full name and abbreviate it as an executable (that you just renamed with the mv command). So this:

$ php composer.phar update friendsofsymfony/elastica-bundle

成为:

$ composer update friendsofsymfony/elastica-bundle

这篇关于运行Composer返回:“无法打开输入文件:composer.phar”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆