I want to install composer in my macbook pro ( MacOS Monterey version 12.1 , chip M1 pro). How I install it (below):
1.first I open the terminal in macbook and paste these :
Mac@Mine-MacBook-Pro ~ % php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”
php -r “if (hash_file(‘sha384’, ‘composer-setup.php’) === ‘906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;”
php composer-setup.php
php -r “unlink(‘composer-setup.php’);”
I got the command line from this website :Composer Download
- press Enter
- Then not success with show message on my terminal :
zsh: command not found: php
zsh: command not found: php
zsh: command not found: php
zsh: command not found: php
- please help fix it for me. I need to install composer and install laravel for my laptop.
big thanks,