After I am using
composer global require laravel/installer
it seems the installation is success. For the second time, the result is:
Changed current directory to /home/ryanadhi/.config/composer
Using version ^3.1 for laravel/installer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
13 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
then if I do
echo $PATH
the result is
~/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin:/home/ryanadhi/go/bin:/home/ryanadhi/.composer/vendor/bin
However if I try
laravel
the result is always:
laravel: command not found
Editing the ~/.bashrc in Ubuntu 20.04 to reflect the path shown in the "Changed current directory to /home/ryanadhi/.config/composer" , message. fixed this for me.
first
gedit ~/.bashrc
then edit the line
export PATH="/home/ryanadhi/.config/composer/vendor/bin:$PATH"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With