33

I am a newbie to Laravel, have been trying to install Laravel, wasted three hours unfortunately didn't work. When I access through public directory, I get these errors:

Warning: require(C:\wamp\www\laravel\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\wamp\www\laravel\bootstrap\autoload.php on line 17 Call Stack

And the following:

Fatal error: require(): Failed opening required 'C:\wamp\www\laravel\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in C

9 Answers 9

37

Did you install Laravel's dependencies? When you unzip the framework in your work environment (i.g. htdocs) you must install the necesary dependencies with the command php composer.phar install (assuming you have installed composer and git). When that is done, you will be able to see the home page of the framework.

Sign up to request clarification or add additional context in comments.

7 Comments

Maybe you need update composer. In cmd go to the directory C:\ProgramData\Composer\bin and run the command php composer.phar self-update. After go to the root directory of laravel framework and run the command php composer and that installs the dependencies. Remember you need to have installed and set composer and git though I think the last one is not really necesary.
thank you, i was able to install the composer through getcomposer.org and now when i run this command, php composer.phar self-update. it says you are using a latest composer version but still same error of autoload
i was able to install the composer and update it successfully even fixed the OPENSSL issue but still same error of autoload. by following your method i have this fuelphp working now which wasn't working before but no laravel :D
The error output is still the same? What happen when you run php composer in the root of laravel?
thanks for all your help it started to work now don't know how but its working
|
29

I had same problem on Windows(Also works for Mac).

Solution:

  1. Install composer
  2. Open cmd
  3. Navigate to your laravel application root
  4. Run composer install command in cmd

Done!

1 Comment

Worked like a charm!
3

This message occurs for Laravel's dependencies. If never run composer install in your project then run this command on the terminal. Else run composer update --no-scripts. All Laravel dependencies will download.

Comments

1

In Windows CMD I faced similar issue and fixed with this command below. After clone a laravel project from my git repository, there was no /vendor directory (logically). This below command creates fresh new /vendor directory and appropriate autoload.php file inside it.

composer update --no-scripts

Comments

0

To get around this problem, doing a composer self-update would do the trick. Moreover, as long as the composer command itself works in your command-line/bash (which means you have it in your PATH) you don't necessarily need to go the actual path where composer.phar resides in (i.e. c:/ProgramData/Composer/bin or whatsoever).

Comments

0

Your Laravel installer is giving an error.

Do composer global require "laravel/installer"

Then the new Laravel installer will be installed. Your new Laravel will not return an error then.

Comments

0

if you are migrating the project,try to delete composer.lock and then composer install .this worked for me!

Comments

0

This error indicates it can not find "autoload.php" under the vendor folder.

Make sure the vendor folder is generated by running the "composer install" command and the autoload.php file also created.

Comments

-1

Just make your storage folder writable. This can be found in your app directory

In your terminal use this command

chmod +w <directory> or chmod a+w <directory>

Make sure you navigate to the directory containing the directory you want to make writable or you point to that path.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.