Problems with global composer installation of Laravel5

Source: Internet
Author: User
The system centos6 executes the following installation command {code...} according to the official documentation. The execution result is all right. {code...} found ~. If laravel is not generated in the composervendorbin directory, commands such as laravelnewblog cannot be executed. Have you ever encountered this? How can this problem be solved? Centos6
Run the following installation commands according to the official documents:

composer global require "laravel/installer=~1.1"

The execution result went smoothly.

Changed current directory to /home/vagrant/.composer./composer.json has been createdLoading composer repositories with package informationUpdating dependencies (including require-dev)  - Installing symfony/process (v2.7.3)    Downloading: 100%  - Installing symfony/console (v2.7.3)    Downloading: 100%  - Installing react/promise (v2.2.1)    Downloading: 100%  - Installing guzzlehttp/streams (3.0.0)    Downloading: 100%  - Installing guzzlehttp/ringphp (1.1.0)    Downloading: 100%  - Installing guzzlehttp/guzzle (5.3.0)    Downloading: 100%  - Installing laravel/installer (v1.2.1)    Downloading: 100%symfony/console suggests installing symfony/event-dispatcher ()symfony/console suggests installing psr/log (For using the console logger)Writing lock fileGenerating autoload files

Discovery ~ /. Laravel is not generated in the composer/vendor/bin directory.

You cannot execute commands such as laravel new blog.

Has someone ever encountered this problem? How can this problem be solved?

Reply content:

Centos6
Run the following installation commands according to the official documents:

composer global require "laravel/installer=~1.1"

The execution result went smoothly.

Changed current directory to /home/vagrant/.composer./composer.json has been createdLoading composer repositories with package informationUpdating dependencies (including require-dev)  - Installing symfony/process (v2.7.3)    Downloading: 100%  - Installing symfony/console (v2.7.3)    Downloading: 100%  - Installing react/promise (v2.2.1)    Downloading: 100%  - Installing guzzlehttp/streams (3.0.0)    Downloading: 100%  - Installing guzzlehttp/ringphp (1.1.0)    Downloading: 100%  - Installing guzzlehttp/guzzle (5.3.0)    Downloading: 100%  - Installing laravel/installer (v1.2.1)    Downloading: 100%symfony/console suggests installing symfony/event-dispatcher ()symfony/console suggests installing psr/log (For using the console logger)Writing lock fileGenerating autoload files

Discovery ~ /. Laravel is not generated in the composer/vendor/bin directory.

You cannot execute commands such as laravel new blog.

Has someone ever encountered this problem? How can this problem be solved?

I have set environment variables. I tried it several times and did not execute the laravel execution file.

Because it is generated in ~ /. Composer/vendor/laravel/installer/laravel
Therefore, I manually granted the chmod + x ~ execution permission ~ /. Composer/vendor/laravel/installer/laravel
Then I made a soft link to/usr/bin/laravel. Now I am able to solve it. It seems to be an official laravel tool bug.
Or is the document not updated yet?

Laravel is a beginner and is still in trial

Make sure to place~/.composer/vendor/binDirectory in yourPATHSolaravelExecutable can be located by your system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.