Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer does not install

Tags:

I am trying running laravel in my computer, but I have some difficults to install this resource in my machine, follow below a little bit of error in terminal of linux

All settings correct for using Composer
Downloading...
Could not create file /var/www/html/composer.phar: fopen(/var/www/html/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/var/www/html/composer.phar): failed to open stream: Permission denied fwrite() expects parameter 1 to be resource, boolean given
Downloading...
Could not create file /var/www/html/composer.phar: fopen(/var/www/html/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/var/www/html/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
Downloading...
Could not create file /var/www/html/composer.phar: fopen(/var/www/html/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/var/www/html/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
The download failed repeatedly, aborting.
alexander@alexander:/var/www/html$

like image 448
Alexander Avatar asked Jun 22 '14 01:06

Alexander


People also ask

How do you check composer is install or not?

You can check your installed composer version using a command composer -v at the current path. Such as: composer -v.


1 Answers

I used sudo as follows:

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

like image 76
M.Hefny Avatar answered Sep 16 '22 15:09

M.Hefny