Laravel does not install

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 have tried to reinstall everything and this error when I try to run Laravel

    
asked by anonymous 12.07.2018 / 03:36

2 answers

0

The error that is being displayed is displayed because bash did not find a valid setting for the laravel command. To set the command, simply execute the procedure below.

Open the .bashrc file with your preferred 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 fine.

    
12.07.2018 / 18:56
0

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

  

macOS: $ HOME / .composer / vendor / bin

     

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

But it has another way of using laravel without the need to install laravel, and it becomes a simpler way, which is also defined in the documentation:

  

create-project-composer -prefer-dist laravel / laravel blog

    
13.07.2018 / 22:51