I need Error Help when trying to install Composer

Asked

Viewed 623 times

0

I am doing maintenance and improvements on a site using Codeigniter v2.x and one of my client’s requirements, was to log in using Facebook.
The problem is I need to install the Composer and I’m not getting it. Last year I made an application with Pusher (Chat) and installed quietly, after that I formatted my Mac and this is the first time needing to deal with the Composer since then.
Back to the problem. has there the file composer.json And of course, it requires the composer.phar and so far everything ok, but when I click to install/update, it returns the following error

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

I don’t know if the problem is being my operating system which is the MacOS El Capitain, Sublime Text version, Codeigniter version or something I’m doing very wrong. Someone has a solution or suggestion?

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 no folder use:

mkdir -p /usr/local/bin

execute with the command:

composer

Browser other questions tagged

You are not signed in. Login or sign up in order to post.