简体   繁体   中英

Cannot Install Laravel 5.1 via composer

Start from tommorow, I don't know why I can't install the laravel 5.1 via composer create project. Here is the error. 作曲家创建项目Laravel 5.1错误

At first I thought there is a problem with the composer, but when I tried to install Laravel 5.2, it's successfully created.

Update: After I run the composer create-project, the vendor folder is not created.

Please help me to fix this issue. Thanks.

I've been running in to this issue lately when creating new instances of my Laravel 5.1 projects.

From what I can piece together it is causing an issue when running the php artisan clear-compiled command as past of the install script.

To get around this I have been running my initial install with the --no-scripts option.

It looks like this is available when creating a projec t too, so try running the below when installing Laravel 5.1 initially:

composer create-project laravel/laravel blog "5.1.*" --no-scripts

Please run

composer update --prefer-dist

As per the comment and viewing the yellow message in the screen,Please try

sudo composer create-project laravel/laravel blog "5.1.*"

This is a composer problem. Install laravel with:

composer create-project --prefer-dist laravel/laravel blog "5.1.*"

Now, in your composer.json installed, remove this:

    "pre-update-cmd": [
        "php artisan clear-compiled"
    ],
    "post-update-cmd": [
        "php artisan optimize"
    ],

So, in your terminal update composer with this:

composer update --prefer-dist

This work for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM