我是 laravel 的新手,在使用 composer 安装 laravel 时我看到了一个错误。我试图找到解决方案,但最终一无所获。我还尝试了 Composer 更新。但是在安装时仍然遇到问题,下面是命令。
命令:
composer create-project --prefer-dist laravel/laravel cms 5.2
错误:
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\cms\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\cms\bootstrap\autoload.php on line 17 PHP Warning: require(C:\xampp\htdocs\cms\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\cms\bootstrap\autoload.php on line 17 PHP Fatal error: require(): Failed opening required 'C:\xampp\htdocs\cms\bootstrap/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\cms\bootstrap\autoload.php on line 17 Script php artisan clear-compiled handling the pre-update-cmd event returned with error code 255
我已经尝试重新安装 Composer ,但问题仍然存在。提前致谢
最佳答案
试试这个:
composer create-project --prefer-dist laravel/laravel cms "5.2.*"
注意* 如果您已有 cms
目录,请在运行上述命令之前先将其删除。
阅读更多:https://laravel.com/docs/5.2/installation#installing-laravel
关于php - Laravel 5.2 - 使用 composer 和 git bash 安装 laravel 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47095620/