CentOS 下使用数据迁移报错

描述

在windows中运行php artisan migrate正常,迁移到CentOs7中报错,由于刚接触这个框架,排查不出问题所在,特此请教!谢谢

报错内容

PHP Fatal error:  Declaration of Carbon\Translator::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) in /www/wwwroot/roast.iicode.top/vendor/nesbot/carbon/src/Carbon/Translator.php on line 18

   Symfony\Component\ErrorHandler\Error\FatalError 

  Declaration of Carbon\Translator::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale)

  at vendor/nesbot/carbon/src/Carbon/Translator.php:18
    14| use ReflectionException;
    15| use ReflectionFunction;
    16| use Symfony\Component\Translation;
    17| 
  > 18| class Translator extends Translation\Translator
    19| {
    20|     /**
    21|      * Translator singletons for each language.
    22|      *


   Whoops\Exception\ErrorException 

  Declaration of Carbon\Translator::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale)

  at vendor/nesbot/carbon/src/Carbon/Translator.php:18
    14| use ReflectionException;
    15| use ReflectionFunction;
    16| use Symfony\Component\Translation;
    17| 
  > 18| class Translator extends Translation\Translator
    19| {
    20|     /**
    21|      * Translator singletons for each language.
    22|      *

      +1 vendor frames 
  2   [internal]:0
      Whoops\Run::handleShutdown()

相关截图

《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
Marrigan
最佳答案

php版本问题吧,你看看本地php版本与线上php版本是否一致。

3年前 评论
iicode (楼主) 3年前
讨论数量: 1
Marrigan

php版本问题吧,你看看本地php版本与线上php版本是否一致。

3年前 评论
iicode (楼主) 3年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!