I encountered several problems when I first came into contact with laravel, especially the two problems during installation, which have not been solved.
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
黄舟2017-05-16 16:51:54
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;