composer / getcomposer.org

getcomposer.org sources

Home Page:http://getcomposer.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installer doesn't work on Mac M1

Theaces opened this issue · comments

Below doesn't work and needs update.
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Can you attach the composer-setup.php file you have here (you may need to run the php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" part of the setup instructions to download without having it be deleted by the second line), as well as the output of: php -r "var_dump(hash_file('sha384', 'composer-setup.php'));" ?

Can you attach the composer-setup.php file you have here (you may need to run the php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" part of the setup instructions to download without having it be deleted by the second line), as well as the output of: php -r "var_dump(hash_file('sha384', 'composer-setup.php'));" ?

I'm confused. Please let me know the exact code I need to copy and paste into my command line to install composer. I got the error message
zsh: command not found: php
zsh: command not found: php
zsh: command not found: php
zsh: command not found: php

I figured it out. I had to do the composer.phar command and then do --version to check that it was installed instead of -v. So, I fixed this issue. Thanks for your help.

The shortcut for --version in Composer is -V (like in all projects based on symfony/console). The -v shortcut is for --verbose