Friday, November 12, 2021

[SOLVED] I can't execute php artisan serve on linux

Issue

Whenever i try to execute php artisan serve command i get this error

PHP Warning: require(/home/mehdi/laravelOrig/vendor/autoload.php): failed to open stream: No such file or directory in /home/mehdi/laravelOrig/artisan on line 18

PHP Fatal error: require(): Failed opening required '/home/mehdi/laravelOrig/vendor/autoload.php' (include_path='.:/usr/share/php') in /home/mehdi/laravelOrig/artisan on line 18

I did try some answers i found on google and here but it still wont work , am I missing something ? Thank you!


Solution

First of all install composer on your system and type following command.

1) goto your project directory from command line
2) composer update 
3) php artisan serve.


Answered By - narayansharma91