我已经安装了v5.6.12时如何安装Laravel v5.2.15?

时间:2018-04-02 16:03:27

标签: laravel

当我已经在我的htdocs中安装了更高版本时,我正在尝试安装更低版本的laravel。但它会引发错误。

C:\xampp\htdocs\laravel-6>composer create-project laravel/laravel=5.2.15 s6
Installing laravel/laravel (v5.2.15)
  - Installing laravel/laravel (v5.2.15): Loading from cache
Created project in s6
> php -r "copy('.env.example', '.env');"
> php artisan clear-compiled
PHP Warning:  require(C:\xampp\htdocs\laravel-6\s6\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php on line 17
PHP Stack trace:
PHP   1. {main}() C:\xampp\htdocs\laravel-6\s6\artisan:0
PHP   2. require() C:\xampp\htdocs\laravel-6\s6\artisan:16
PHP Fatal error:  require(): Failed opening required 'C:\xampp\htdocs\laravel-6\s6\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php on line 17
PHP Stack trace:
PHP   1. {main}() C:\xampp\htdocs\laravel-6\s6\artisan:0
PHP   2. require() C:\xampp\htdocs\laravel-6\s6\artisan:16

Warning: require(C:\xampp\htdocs\laravel-6\s6\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php on line 17

Call Stack:
    0.0007     344912   1. {main}() C:\xampp\htdocs\laravel-6\s6\artisan:0
    0.0016     346488   2. require('C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php') C:\xampp\htdocs\laravel-6\s6\artisan:16


Fatal error: require(): Failed opening required 'C:\xampp\htdocs\laravel-6\s6\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php on line 17

Call Stack:
    0.0007     344912   1. {main}() C:\xampp\htdocs\laravel-6\s6\artisan:0
    0.0016     346488   2. require('C:\xampp\htdocs\laravel-6\s6\bootstrap\autoload.php') C:\xampp\htdocs\laravel-6\s6\artisan:16

Script php artisan clear-compiled handling the pre-update-cmd event returned with error code 255

但是当我尝试安装laravel v5.6.12时,它再次轻松安装。请告诉我一个安装较低版本的laravel同时保持更高版本的方法。感谢。

错误:成员建议的更新

我被建议手动下载laravel的特定版本,我也尝试更新作曲家但仍面临问题。发生的错误如下所示:

error

1 个答案:

答案 0 :(得分:0)

您是否尝试过使用此命令安装laravel 5.2.15的干净副本?

composer create-project --prefer-dist laravel/laravel laravelProjectFolder "5.2.15"