Trying to setup laravel 4 gives failed to open str

2019-03-11 16:10发布

Trying to setup laravel 4. on MAC installed composer but when I go to the public folder via XAMPP I get this.

Warning: require(/Applications/XAMPP/xamppfiles/htdocs/laravel-master/bootstrap/../vendor/autoload.php) [function.require]: failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/laravel-master/bootstrap/autoload.php on line 17

Fatal error: require() [function.require]: Failed opening required '/Applications/XAMPP/xamppfiles/htdocs/laravel-master/bootstrap/../vendor/autoload.php' (include_path='.:/Applications/XAMPP/xamppfiles/lib/php:/Applications/XAMPP/xamppfiles/lib/php/pear') in /Applications/XAMPP/xamppfiles/htdocs/laravel-master/bootstrap/autoload.php on line 17

5条回答
\"骚年 ilove
2楼-- · 2019-03-11 16:40

You need to provide the following command from your terminal

composer install

it might get stuck due to permission issues, so try with

sudo composer install

I guess this should solve your problem.

查看更多
Viruses.
3楼-- · 2019-03-11 16:56

Suppose your laravel site directory is /srv/example.com/

and your VPS username is "ubuntu". So write this command

sudo chown -R ubuntu.www-data /srv/example.com/

Most of the time hosting username is "www-data". That time you can write this

sudo chown -R www-data.www-data /srv/example.com/
查看更多
姐就是有狂的资本
4楼-- · 2019-03-11 16:57

laravel need 5.3.7. please check your php version . if its below from mentioned then its will produce like this error Server Requirement

查看更多
三岁会撩人
5楼-- · 2019-03-11 17:00

in the command prompt try this

D:\xampp\htdocs\laravel>composer update 
查看更多
迷人小祖宗
6楼-- · 2019-03-11 17:02

Okay,

I had the same problem and found a way to fix it.

Just read this: http://laravel.com/docs/installation and follow it.

Install composer first, add laravel to the root and install the composer.json with cmd. It worked for me.

查看更多
登录 后发表回答