简体   繁体   中英

Can't Setup Laravel Project Using Composer

I try to setup a laravel project using composer with this command

composer create-project laravel/laravel blog "5.1.*"

But i got following error:

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




[RuntimeException]                                                           
  Error Output: PHP Warning:  require(/home/iwan/blog/bootstrap/../vendor/aut  
  oload.php): failed to open stream: No such file or directory in /home/iwan/  
  blog/bootstrap/autoload.php on line 17                                       
  PHP Fatal error:  require(): Failed opening required '/home/iwan/blog/boots  
  trap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pea  
  r') in /home/iwan/blog/bootstrap/autoload.php on line 17  

Does anybody know how to fix this ?

Thank you

Actually, the project is created but the dependencies are not installed so open your terminal/command prompt and run following commands:

cd blog
composer install

Also, if you want then, you may install the Laravel installer so you can create a new project using something like the following:

laravel new Blog

This is a little bit faster. So to install the installer you need to run the following command from the command prompt/terminal:

composer global require "laravel/installer=~1.1"

Once you install the installer you may then run laravel new someproject from the terminel to create a new project with all the dependencies ( According to Documentation ).


Note: Check this and this as well if needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM