Could not open input file: composer.phar

前端 未结 15 694
感情败类
感情败类 2020-12-02 09:38

I am trying to install zendframework using composer tool in wamp server.

The following steps are done towards installation

  1. I downlo

相关标签:
15条回答
  • 2020-12-02 09:53

    I am using Windows 7, and I got the same problem as yours while using Composer via cmd.

    The problem is solved when I use

    php C:\ProgramData\ComposerSetup\bin\composer.phar create-project slim/slim-skeleton
    

    instead of

    php composer.phar create-project slim/slim-skeleton
    

    Hope this is useful for people who got the same problem.

    0 讨论(0)
  • 2020-12-02 09:53

    First try this: dont use the php composer.phar [parameters] simply use composer [parameters] if this doesn't work for you than try the rest. Hope it helps.

    0 讨论(0)
  • 2020-12-02 09:54

    If you go through the documentation, they have mentioned to use php composer.phar Link: https://getcomposer.org/doc/03-cli.md#update-u

    Don't use php composer.phar only give composer

    Command: composer self-update

    It will work.

    0 讨论(0)
  • 2020-12-02 09:57

    Use this :

    php -r "readfile('https://getcomposer.org/installer');" | php
    

    This will install composer to the current directory so that you can use php composer.phar

    0 讨论(0)
  • Initially, I was running php composer.phar self-update and got the same error message.

    As a resolve, you should use composer command directly after install it.From the command prompt, just type composer and press enter.

    If composer is installed correctly then you should able to see a lot of suggestion and command list from composer.

    If you are up to this point then you should able to run composer self-update directly.

    0 讨论(0)
  • 2020-12-02 09:57

    dont use php composer.phar self-update
    First go to Your project directory
    simply use composer.phar self-update
    This works for me

    0 讨论(0)
提交回复
热议问题