having trouble installing composer

后端 未结 6 1190
你的背包
你的背包 2020-12-24 01:59

I am installing composer with the following cammand

curl -s https://getcomposer.org/installer | php

But I am keep getting below err

相关标签:
6条回答
  • 2020-12-24 02:23

    sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin

    Run this command and it will work, so i think :D

    0 讨论(0)
  • 2020-12-24 02:30

    To download / install on MacOSX, you can do the following steps or try the homebrew steps below:

    1. Goto a directory you can write to:

      cd ~

    2. get composer:

      curl -sS https://getcomposer.org/installer | php

    3. move composer into a bin directory in your $PATH var:

      sudo mv composer.phar /usr/local/bin/composer

    4. double check composer works

      composer about

    5. (optional) Update composer:

      sudo composer self-update

    Homebrew

    brew update
    brew tap homebrew/homebrew-php
    brew tap homebrew/dupes
    brew tap homebrew/versions
    brew install php55-intl
    brew install homebrew/php/composer
    
    0 讨论(0)
  • 2020-12-24 02:41

    In Ubuntu Vivid 15.04. Try: Steps:

    1. Open terminal and write: sudo su and press Enter.
    2. Paste this: curl -sS https://getcomposer.org/installer | php and press Enter. (This install composer, Wait to finish)
    3. And Finaly Write exit

    Note: Sorry, my English is bad :(

    0 讨论(0)
  • 2020-12-24 02:43

    In case if you dont have curl in your system, you can still install composer using the following command

    Go to a directory where you can write,

    cd yourDirectory
    
    php -r "readfile('https://getcomposer.org/installer');" | php -d detect_unicode=off
    
    0 讨论(0)
  • 2020-12-24 02:44

    I had the same error. I ended up adding sudo to the php side and it worked for me.

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

    Try this instead and change the setting on the fly, just for this command

    curl -sS https://getcomposer.org/installer | php -d detect_unicode=Off
    
    0 讨论(0)
提交回复
热议问题