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.
Related
I want to install composer for laravel development on my latest version of mac OS. I followed all the step by step instructions to install composer on the website and it installed composer.phar. So I have to move to /usr/local/bin/composer for it to work.
I ran the usual command:
mv composer.phar /usr/local/bin/composer
and it gave an error saying /usr/local/bin/composer: No such file or directory
I even added a sudo command in front to see if it works and received the same error. I looked up other solution telling me to make a new directory there, but it wouldn't let me do so and gave me a permission denied error.
You should create the directory manually before proceeding:
sudo mkdir -p /usr/local/bin
then
sudo mv composer.phar /usr/local/bin/composer
For solving your second problem
It needs zip extension,
Check your PHP version first
php -v
If for instance PHP version is 7.2, then try below command (use your PHP version)
brew update
brew install php#7.2
brew link php#7.2
I am trying to install Composer on OSX High Sierra.
Following the instructions on https://getcomposer.org/download/, I execute this in Terminal:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
This takes a long time (1 minute maybe) and then gives me the following error:
Warning: copy(https://getcomposer.org/installer): failed to open stream: Operation timed out in Command line code on line 1
Any clues what's going on?
Not sure what is going on, but consider using Homebrew to install composer.
First install Homebrew, then run
$ brew install composer
For reference, see https://brew.sh.
Xammp showing me an error i have reinstall it again but still shows me an error
sudo apt-get install libapache2-mod-php5
Post taken from here : https://askubuntu.com/questions/491629/how-to-install-php-mbstring-extension-in-ubuntu/491631
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.
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