I need help with error when trying to install Composer

0

I'm doing maintenance and improvements on a site using CodeIgniter v2.x and one of my client's requirements was to log in using Facebook. Home The problem is that I need to install Composer and I can not. Last year I made an application with Pusher (Chat) and installed it quietly, after that I formatted my Mac and this is the first time I need to deal with Composer since then. Getting back to the problem. there is the file composer.json Of course, it requires composer.phar and so all ok, but when I click to install / make update, it returns the following error

    — COMPOSER —
   executing: ./composer.phar install -n -v
   Error: [Errno 13] Permission denied

I do not know if the problem is being my operating system which is MacOS El Capitain , Sublime Text version, CodeIgniter version or something I'm doing very wrong. Anyone have a solution or suggestion?

    
asked by anonymous 15.06.2016 / 19:58

1 answer

2

Install using the following steps from the same composer page:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '070854512ef404f16bac87071a6db9fd9721da1684cd4589b1196c3faf71b9a2682e2311b36a5079825e155ac7ce150d') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Then move your .phar to be global

sudo mv composer.phar /usr/local/bin/composer

obs: if there is no use folder:

mkdir -p /usr/local/bin

run with the command:

composer
    
15.06.2016 / 21:39