when I trying to self-update composer I get "Permission denied" error message, but when I try to do same command with "sudo" - I get error message "command not found". Please help me..
In terminal with sudo I type full path to composer.phar and it's work for me!
sudo /usr/bin/composer.phar self-update
For me this worked:
sudo -H composer self-update
Related
If I run composer then I get:
Warning: This development build of composer is over 60 days old. It is
recommended to update it by running
"C:\ProgramData\ComposerSetup\bin\composer.phar self-update" to get
the latest version
However, if I run the command C:\ProgramData\ComposerSetup\bin\composer.phar self-update then the following window appears, which says that the file could not be opened:
Try
php C:\ProgramData\ComposerSetup\bin\composer.phar self-update
I just figured out that I could also just execute
composer selfupdate
or
composer self-update
try Also:
composer update
it should run
I run the below commands and it worked for me, so my composer version is 1.10.20 to 2.0.9
php C:\ProgramData\ComposerSetup\bin\composer.phar self-update
composer self-update --2
when I try to self-update composer I get "Permission denied" error message, but when I try to do the same command with "sudo" - I get error message "command not found".
Same problem as here:
link to the similar problem
But the solutions to type into the terminal:
sudo /usr/bin/composer.phar self-update
or
sudo -H composer self-update
won't work for me. I just get command not found messages:
sudo: /usr/bin/composer.phar: command not found
I work on a Mac and some months ago I remember that it worked.
I know there are some questions about how to install composer on SO, but they did not help me.
I am trying to install composer (for laravel). I have OS X El Capitan.
I downloaded composer like this:
$ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Composer successfully installed to: /Users/blckbird/composer.phar
Use it: php composer.par
Next, I tried to execute the laravel installation:
composer global require "laravel/installer"
Which did not work because:
-bash: composer: command not found
So I tried:
sudo mv composer.phar /usr/local/composer
Which worked, however, I still can not execute composer (same error as above).
What am I doing wrong and how can I install composer correct?
Since your composer.phar is installed in /Users/blckbird/, try this for global installation:
sudo mv /Users/blckbird/composer.phar /usr/local/bin/composer
Note: On some versions of OSX the /usr directory does not exist by default. If you receive the error "/usr/local/bin/composer: No such file or directory" then you must create the directory manually before proceeding: mkdir -p /usr/local/bin. More info.
I am trying to install composer on my Mac so that I can use the Laravel framework. I successfully downloaded composer through the terminal, and then I moved composer.phar to to usr/local/bin using the command: sudo mv composer.phar /usr/local/bin.
I then changed directories to my root directory where I have the laravel-master files. After changing to this directory in the terminal, and then using the command: composer install
I receive the error: -bash: composer: command not found
I have tried other variations (such as php composer.phar install, etc..), however, I keep receiving the same error.
Any help would be much appreciated. Thank you!
Make sure that /usr/local/bin is in your $PATH
$ echo $PATH
Then execute
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
^^^^^^^^ you didn't rename it
For reference see
Installing composer.phar globally on *nix
I'm running Mavericks and had same problem. I changed /usr/local/bin/composer to /usr/bin/composer and it worked for me.
for mac os x Mavericks and Yosemite El capitan
Change
sudo mv composer.phar /usr/local/bin/composer
To
sudo mv composer.phar /usr/bin/composer
Now if you just write composer in terminal, it will show you all available commands
Then "if running MAMP" navagate you htdocs folder and run
composer create-project laravel/laravel laratest
Hope that helps
A quick copy-paste version including sudo:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Now in 2017 I am using MacOS SIERRA 10.12.6 and sudo mv composer.phar /usr/bin/composer doesn't work. It works for me sudo mv composer.phar /usr/local/bin/composer. Now I can run composer instead of php composer.pha
I want to use laravel, so, firstly I have to install composer, I uploaded laravel in a folder "laravel" now i go to the folder and I do this
curl -sS https://getcomposer.org/installer | php
according the site of composer...
So, now, according laravel I should do this
composer create-project laravel/laravel
but returns "composer command not found"
When I finished installing composer I get this Use it: php composer.phar
So, I try again php composer.phar create-project laravel/laravel
and it runs,but it stays as Installing dependencies (incluiding require-dev) for a long long time.
My enviroment is Debian 6, and its a cloud server, so, internet should not be a problem.
It just stays like that, any idea what I'm doing wrong? How to solve this and make it run?
Thanks
$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer
# if you're installing as root or privileged account, don't leave the permissions on default 777
$ chmod 755 /usr/local/bin/composer
$ composer install