tendo problemas para instalar o compositor

Eu estou instalando o compositor com o seguinte cammand

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

Mas eu continuo ficando abaixomensagem de erro

Zafars-MacBook-Pro:etc zafarsaleem$ curl -s https://getcomposer.org/installer | php
#!/usr/bin/env php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The detect_unicode setting must be disabled.
Add the following to the end of your `php.ini`:
detect_unicode = Off

A php.ini file does not exist. You will have to create one.

Como posso instalar o composer para remover o erro acima?

EDITAR

Zafars-MacBook-Pro:etc zafarsaleem$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File:         (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

Última edição

Depois de algumas pesquisas, descobri quephp.ini arquivo que está sendo usado está em/etc/php.ini. No entanto, quando eu verifiquei este arquivo/etc pasta não estava lá./etc pasta contidaphp.ini.default pasta que está ligada a/private/etc/php.ini.default. Então eu adicioneidetect_unicode = Off em/etc/php.ini.default e o renomeado este arquivo paraphp.ini. Agora quando eu executo o comando abaixo

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

OU

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

Então eu recebo erros seguintes

Zafars-MacBook-Pro:/ zafarsaleem$ sudo curl -s https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Download failed: failed to open stream: Permission denied
Downloading...
Download failed: failed to open stream: Permission denied
Downloading...
Download failed: failed to open stream: Permission denied
The download failed repeatedly, aborting.

Como posso instalar o compositor no meu computador e remover os problemas acima? Por favor ajude

questionAnswers(6)

yourAnswerToTheQuestion