search

Home  >  Q&A  >  body text

Error running php composer.phar search

I downloaded and installed composer on the server, and then moved composer.phar to /usr/local/bin/composer
Then I opened the project directory and ran php composer.phar search. Could not open input file appeared : composer.phar,
I also tried other commands, but still got this error.

天蓬老师天蓬老师2750 days ago569

reply all(3)I'll reply

  • 滿天的星座

    滿天的星座2017-05-24 11:36:07

    The file name after renaming is composer, not composer.phar. Enter it directlycomposer search

    reply
    0
  • 怪我咯

    怪我咯2017-05-24 11:36:07

    composer search xxx

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-24 11:36:07

    composer.phar 是一个打包了的 php 程序。其实还是一个文件,和其它的 php 文件一样可以 php composer.phar 打开,同样也可以 ./composer.phar。但是你把 composer.phar 移动到 /usr/local/bin 去了,而且改了名字 composer,所以你可以直接使用 composer 命令了。至于为什么用 php composer.phar 不行了,因为你的文件在当前目录没有 composer.phar Yeah.

    reply
    0
  • Cancelreply