Quantcast
Channel: having trouble installing composer - Stack Overflow
Viewing all articles
Browse latest Browse all 7

having trouble installing composer

$
0
0

I am installing composer with the following cammand

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

But I am keep getting below error message

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.

How can I install composer be removing above error?

EDIT

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)

Latest Edit

After some research I found that php.ini file which is being used is in /etc/php.ini. However, when I checked this file in /etc folder it wasn't there. /etc folder contained php.ini.default folder which linked to /private/etc/php.ini.default. So I added detect_unicode = Off in /etc/php.ini.default and the renamed this file to php.ini. Now when I execute below command

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

OR

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

Then I get following errors

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.

How can I install composer on my computer and remove above problems? Please help


Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>