I am installing composer with the following cammand
curl -s https://getcomposer.org/installer | php
But I am keep getting below err
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