从git版本库克隆下来Laravel项目之后,忘了composer install ,结果爆了如下错误~
PHP Fatal error: require(): Failed opening required '/bcc/production/BCCAdminV1.0/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in
运行:
composer install
结果又报错:
ubuntu@ip-172-31-4-119:$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0].
- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.22) does not satisfy that requirement.
Problem 2
- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.22) does not satisfy that requirement.
- phpunit/phpunit-mock-objects 2.3.8 requires doctrine/instantiator ^1.0.2 -> satisfiable by doctrine/instantiator[1.1.0].
- Installation request for phpunit/phpunit-mock-objects 2.3.8 -> satisfiable by phpunit/phpunit-mock-objects[2.3.8].
ubuntu@ip-172-31-4-119:$ ll
意思是我的php版本太低,有个包的要求是php版本大于7.1我的是7.0.22,解决办法有两种,
一是忽略:
composer install --ignore-platform-reqs
二是直接删除composer.lock,我是直接把它移动到另外一个地方去了。
然后再:composer install
再次访问网站,就可以了。