laravel installation version problem
PHPz
PHPz 2017-05-16 16:49:54
0
1
407

I encountered several problems when I first came into contact with laravel, especially the two problems during installation, which have not been solved.

  1. Error when installing laravel 5.1:

Installation command:

composer create-project laravel/laravel learnlaravel52 5.1.11 --prefer-dist

mistake:

Created project in learnlaravel52
> php -r "copy('.env.example', '.env');"
> php artisan clear-compiled
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error


  [RuntimeException]
  Error Output:

I have Googled this problem for a long time, and there is very little relevant information. There is an article that talks about a solution, but installing that solution did not solve it successfully.

2. How to install the specified version

Installation command:

composer create-project laravel/laravel learnlaravel52 5.2.31 --prefer-dist

Use artisan to check the installed version. The version is 5.2.45, which is not the specified 5.2.31. I have never figured out why

PHPz
PHPz

学习是最好的投资!

reply all(1)
黄舟

You can change composer.json;
Put

    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*"
    },

changed to

    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.31"
    },

Then execute omposer update
to accurately install version 5.2.31;

However; it is more recommended to use the latest 5.2.45;
I want to compare it to 5.2.31; mainly to fix bugs; the usage remains unchanged;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!