如何在第一次安装Laravel时修复错误?

时间:2015-12-14 16:10:06

标签: laravel laravel-5 laravel-5.1

我使用位于驱动器E的WAMP服务器,并且我第一次尝试安装Laravel

首先我安装了Composer,然后安装了Laravel。然后我运行了位于http://localhost/laravel/public/的服务器,但它出现了这个错误:

Warning: require(E:\wamp\www\laravel\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in E:\wamp\www\laravel\bootstrap\autoload.php on line 17
Call Stack
#   Time    Memory  Function    Location
1   0.0002  241656  {main}( )   ..\index.php:0
2   0.0003  244568  require( 'E:\wamp\www\laravel\bootstrap\autoload.php' ) ..\index.php:22

( ! ) Fatal error: require(): Failed opening required 'E:\wamp\www\laravel\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in E:\wamp\www\laravel\bootstrap\autoload.php on line 17
Call Stack
#   Time    Memory  Function    Location
1   0.0002  241656  {main}( )   ..\index.php:0
2   0.0003  244568  require( 'E:\wamp\www\laravel\bootstrap\autoload.php' ) ..\index.php:22

如何防止此错误?

1 个答案:

答案 0 :(得分:2)

您需要通过composer安装项目依赖项。在项目文件夹内运行:

composer install

如果您没有安装作曲家,请按以下方式进行操作: