I have installed xampp in arch linux and also the composer using the command given below:
curl -sS https://getcomposer.org/installer |
sudo php -- --install-dir=/usr/local/bin --filename=composer
I have also installed laravel using the following commands.
composer global require "laravel/installer=~1.1"
export PATH="~/.composer/vendor/bin:$PATH"
But still, when I type laravel ne <project> I get the error
bash:laravel is not a command
How can I check it is properly installed?
Modify you shell script
sudo nano ~/.bashrc
And add this
export PATH="$PATH:~/.composer/vendor/bin"
or this
export PATH="~/.config/composer/vendor/bin:$PATH"
Related
sS https://getcomposer.org/installer | php
from the terminal. I got this output:
Composer successfully installed to: /Users/kevin/composer.phar
Use it: php composer.phar
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:
The OpenSSL library (0.9.8zc) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.
Then I tried running: composer -h
And it didn't work, it said command not found. Any ideas on how to solve this?
Would be appreciated.
Thanks in advance,
Kevin
As the script said, composer is installed to /Users/kevin/composer.phar, which means it is only available when you are in this directory. In order to make it available everywhere, the file has to be placed inside the /usr/local/bin folder.
The following command will install it there directly:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
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 installed composer while trying to install cakePhp, but the installation was not successful and I want to uninstall composer.
I am not finding any way to do this.
For the installation I used the command curl -s https://getcomposer.org/installer | php
I am working in linux
During the installation you got a message
Composer successfully installed to: ... this indicates where Composer was installed. But you might also search for the file composer.phar on your system.
Then simply:
Delete the file composer.phar.
Delete the Cache Folder:
Linux: /home/<user>/.composer
Windows: C:\Users\<username>\AppData\Roaming\Composer
That's it.
Uninstall composer
To remove just composer package itself from Ubuntu 16.04 (Xenial Xerus) execute on terminal:
sudo apt-get remove composer
Uninstall composer and it's dependent packages
To remove the composer package and any other dependant package which are no longer needed from Ubuntu Xenial.
sudo apt-get remove --auto-remove composer
Purging composer
If you also want to delete configuration and/or data files of composer from Ubuntu Xenial then this will work:
sudo apt-get purge composer
To delete configuration and/or data files of composer and it's dependencies from Ubuntu Xenial then execute:
sudo apt-get purge --auto-remove composer
https://www.howtoinstall.co/en/ubuntu/xenial/composer?action=remove
Additional information about removing/uninstalling composer
Answers above did not help me, but what did help me is removing:
~/.cache/composer
~/.local/share/composer
~/.config/composer
Hope this helps.
If you install the composer as global on Ubuntu, you just need to find the composer location.
Use command
type composer
or
where composer
For Mac users, use command:
which composer
and then just remove the folder using rm command.
curl -sS https://getcomposer.org/installer | sudo php
sudo mv composer.phar /usr/local/bin/composer
export PATH="$HOME/.composer/vendor/bin:$PATH"
If you have installed by this way simply
Delete composer.phar from where you've putted it.
In this case path will be /usr/local/bin/composer
Run this command
sudo rm /usr/local/bin/composer/composer.phar
Note: There is no need to delete the exported path.
Find the Location of the Composer by typing this command
whereis composer
Then You will get the output like this
composer: /usr/local/bin/composer
then cd /usr/local/bin/
then remove composer by this command
sudo rm -r composer
Just to see if anyone can help me out, i'm sure its very very basic but I've only just flipped to mac from windows and learning the terminal basics
I am trying to install and use Symfony, i have installed homebrew, then i put in the composer command-
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
it downloads and installs but then it says i the path/ directory is not valid/ now i understand i need to make it, but i'm not sure where this will lie, and what is the command to make a director? is it mkdir -- ?
heres the terminal log-
Calvins-MacBook-Pro:~ calvin$ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
mv composer.phar /usr/local/bin/composer
Composer successfully installed to: /Users/calvin/composer.phar
Use it: php composer.phar
Calvins-MacBook-Pro:~ calvin$ mv composer.phar /usr/local/bin/composer
mv: rename composer.phar to /usr/local/bin/composer: No such file or directory
Calvins-MacBook-Pro:~ calvin$
https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx
Note: In OSX Yosemite 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 /usr/local/bin/ manually before
proceeding.
To create an directory you need to execute:
sudo mkdir <path>
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