运行Composer返回:“无法打开输入文件:composer.phar”

编程入门 行业动态 更新时间:2024-10-24 19:14:39
本文介绍了运行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.

推荐答案

您按照以下说明操作:

getcomposer /doc/00-intro.md

这会让您执行以下操作:

Which tell you to do the following:

$ curl -sS getcomposer/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”

本文发布于:2023-06-04 08:35:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/493361.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法打开   文件   Composer   composer   phar

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!