Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Im getting an error "No such file or directory" when installing Composer Globally

I am trying to install Composer globally but I get an error when I do sudo mv composer.phar /usr/local/bin/composer The error reads

mv: composer.phar: No such file or directory

When I try and instal Laravel

composer global require laravel/installer

And after I try to run

Laravel

I get

zsh: command not found: laravel
like image 853
ghost2092000 Avatar asked Dec 14 '19 20:12

ghost2092000


1 Answers

After composer is installed, I used the following command to create a alias for the composer file. So now its running globally.

alias composer='/usr/local/bin/composer'

Now can try to run

composer
like image 118
Eduard Brokan Avatar answered Sep 20 '22 11:09

Eduard Brokan