Why "no such file or directory ... autoload.php" when accessing Laravel app?

75,838

Solution 1

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.

Solution 2

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!

Solution 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.

Share:
75,838
Admin
Author by

Admin

Updated on September 06, 2020

Comments

  • Admin
    Admin over 3 years

    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