Could not open input file: composer.phar

前端 未结 15 693
感情败类
感情败类 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:44

    Instead of

    php composer.phar create-project --repository-url="http://packages.zendframework.com" zendframework/skeleton-application path/to/install
    

    use

    php composer.phar create-project --repository-url="https://packages.zendframework.com" zendframework/skeleton-application path/to/install
    

    Just add https instead of http in the URL. Though it's not a permanent solution, it does work.

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

    This is how it worked for me:

    • Make sure composer is installed without no errors.

    • Open "System Properties" on windows and go to the "Advanced" tab. (You can just press the windows button on your keyboard and type in "Edit the system environment variables`

    • "Environment variables"

    • Under "System variables" Edit "PATH"

    • Click on "New".

    • Type in: C:\ProgramData\ComposerSetup\bin\composer.phar

    • Close all folders & CMDs + restart you WAMP server.

    • Go to whatever directory you want to install a package in and type in

      composer.phar create-project slim/slim-skeleton

    for example.

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

    Another solution could be.. find the location of composer.phar file in your computer. If composer is installed successfully then it can be found in the installed directory.

    Copy that location & instead of composer.phar in the command line, put the entire path there.

    It also worked for me!

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

    The composer.phar install is not working but without .phar this is working.

    We need to enable the openssl module in php before installing the zendframe work.

    We have to uncomment the line ;extension=php_openssl.dll from php.ini file.

    composer use different php.ini file which is located at the wamp\bin\php\php-<version number>\php.ini

    After enabling the openssl we need to restart the server.

    The execute the following comments.

    I can install successfully using these commands -

    composer self-update
    composer install --prefer-dist
    

    enter image description here

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

    Try in command line:

    curl -sS https://getcomposer.org/installer | php
    
    0 讨论(0)
  • 2020-12-02 09:50

    I had the same issue when trying to use php composer install in a local directory on my Apache server for a laravel project I cloned from Github. My problem was I had already setup composer globally on my Ubuntu 18 machine.
    Adding sudo instead of php started the install of a whole slew of packages listed in the json.lock file i.e. sudo composer install.

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