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
Related
I have installed composer on shared hosting.
It's successfully installed on my shared hosting.
I have followed this tutorial for installation.
Link :- https://www.globo.tech/learning-center/laravel-under-cpanel/
Screenshot after installation.
I have used below command and it's working fine for me.
php composer.phar
But when I tried to install laravel in my public_html directory using below command,
composer create-project --prefer-dist laravel/laravel borrowpet "5.2.*"
It's not working. It shows composer command not please find below screenshot for error.
Please let me know what I'm missing while installing composer.
Use the command php composer.phar create-project --prefer-dist laravel/laravel borrowpet "5.2.*"
and make sure you execute the command from the directory where compser.phar exists.
I'm just starting with laravel. I'm following this laravel guide. My environment is an aws server running php 5.6, I have already installed composer.
https://laravel.com/docs/5.2/quickstart#deleting-tasks
When I type:
composer create-project laravel/laravel quickstart --prefer-dist
I get the following error:
Cannot create cache directory /home/ubuntu/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
How can I fix this? Is this a major problem? If I proceed would I run into trouble after?
Also, is it bad practice to use sudo?
When you installed composer pretty sure you used $ sudo command because of that the ~/.composer folder was created by the root.
Run this to fix the issue:
$ sudo chown -R $USER $HOME/.composer
You can try this method which I used for my project on a LAMP server
sudo composer create-project laravel/laravel quickstart --prefer-dist
After that, you change the permission back to www-data user & group
sudo chown www-data:www-data quickstart\ -R
sudo usermod -a -G www-data ubuntu_user_name
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
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