laravel 项目部署到服务器过程中更新composer install 报错

laravel 项目部署到服务器过程中更新composer install 报错
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for doctrine/lexer 1.1.0 -> satisfiable by doctrine/lexer[1.1.0].
    - doctrine/lexer 1.1.0 requires php ^7.2 -> your PHP version (7.1.3) does not satisfy that requirement.
  Problem 2
    - Installation request for nesbot/carbon 2.23.1 -> satisfiable by nesbot/carbon[2.23.1].
    - nesbot/carbon 2.23.1 requires php ^7.1.8 || ^8.0 -> your PHP version (7.1.3) does not satisfy that requirement.
  Problem 3
    - Installation request for spatie/laravel-feed 2.2.2 -> satisfiable by spatie/laravel-feed[2.2.2].
    - spatie/laravel-feed 2.2.2 requires php ^7.2 -> your PHP version (7.1.3) does not satisfy that requirement.
  Problem 4
    - doctrine/lexer 1.1.0 requires php ^7.2 -> your PHP version (7.1.3) does not satisfy that requirement.
    - egulias/email-validator 2.1.11 requires doctrine/lexer ^1.0.1 -> satisfiable by doctrine/lexer[1.1.0].
    - Installation request for egulias/email-validator 2.1.11 -> satisfiable by egulias/email-validator[2.1.11].

分析:以下错误为php版本太低导致,所以我们需要清理composer.lock文件。

解决方法是:
删除 composer.lock 文件,重新执行 composer install,这样就能重新生成 composer.lock 文件了。
这样就开始更新laravel所有部署配置了

如果报错:The “https://packagist.laravel-china.org/packages.json” file could not be downloaded

composer install 解决:The “https://packagist.laravel-china.org/packages.json” file could not be downloaded

部署完毕后 除了首页正常其它目录出现404

Nginx服务器中 Laravel 项目部署到目录 404错误

阅读 1903

Comments