Laravel does not install

Asked

Viewed 111 times

0

kalil@debian:~$ composer global require "laravel/installer"
Changed current directory to /home/kalil/.config/composer
Using version ^2.0 for laravel/installer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 12 installs, 0 updates, 0 removals
  - Installing symfony/process (v3.4.12): Downloading (100%)         
  - Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%)         
  - Installing symfony/filesystem (v3.4.12): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.8.0): Downloading (100%)         
  - Installing psr/log (1.0.2): Downloading (100%)         
  - Installing symfony/debug (v3.4.12): Downloading (100%)         
  - Installing symfony/console (v3.4.12): Downloading (100%)         
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)         
  - Installing psr/http-message (1.0.1): Downloading (100%)         
  - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)         
  - Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)         
  - Installing laravel/installer (v2.0.1): Downloading (100%)         
symfony/console suggests installing psr/log-implementation (For using the console logger)
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/lock ()
Writing lock file
Generating autoload files
kalil@debian:~$ laravel
bash: laravel: comando não encontrado

I’ve tried to reinstall everything and that mistake when I try to run the Laravel

2 answers

0

The error being shown is displayed because bash did not find a valid definition for the command laravel. To set the command, just run the procedure below.

Open the file .bashrc with your favorite editor

vi ~/.bashrc

Add the following text to the file and save

export PATH="~/.config/composer/vendor/bin:$PATH"

Run the following command on the terminal

source ~/.bashrc

Restart the terminal and now everything should be in order.

0

Basically you need the PATH configuration as explained in the comment above and also in the documentation of the Laravel,

macOS: $HOME/. Composer/vendor/bin

GNU / Linux Distributions: $HOME/. config/Composer/vendor/bin

However, there is another way to use the Laravel without the need to install the Laravel, and it ends up becoming a simpler way, which is also defined in the documentation:

Composer create-project --prefer-dist Laravel/Laravel blog

Browser other questions tagged

You are not signed in. Login or sign up in order to post.