【问题标题】:how can i solve laravel Homestead error 500我如何解决 laravel Homestead 错误 500
【发布时间】:2020-07-31 21:08:04
【问题描述】:

在多次尝试安装 Homestead 并创建 Laravel 项目后,我做到了并创建了一个名为 myprokarezma.test 的本地主机。

但是,当我在本地访问这个域时,我在 Laravel 的布局中得到“错误 500”,这意味着 homestead 连接到 Laravel 项目。

我不知道错误 500 的原因,它应该显示一条欢迎消息,正如我在教程视频中看到的那样。

堆栈跟踪

production.ERROR:声明 Symfony\Component\Translation\TranslatorInterface::setLocale($locale) 必须兼容 Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) {"异常":"[对象] (Symfony\Component\Debug\Exception\FatalErrorException(代码:64): 宣言 Symfony\Component\Translation\TranslatorInterface::setLocale($locale) 必须兼容 Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) 在 /home/vagrant/code/laravel-5.8-master/vendor/symfony/translation/TranslatorInterface.php:24)

【问题讨论】:

  • 查看storage/logs/laravel.log 告诉你的内容……
  • 你的意思是在浏览器中打开文件还是打开路径?,对不起,这是我的第一个 laravel 项目
  • production.ERROR: 声明 Symfony\Component\Translation\TranslatorInterface::setLocale($locale) 必须与 Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) {"exception ":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 64): 声明 Symfony\\Component\\Translation\\TranslatorInterface::setLocale($locale) 必须与 Symfony 兼容\\Contracts\\Translation\\LocaleAwareInterface::setLocale(string $locale) at /home/vagrant/code/laravel-5.8-master/vendor/symfony/translation/TranslatorInterface.php:24) [stacktrace

标签: laravel homestead


【解决方案1】:

尝试添加

"symfony/translation": "4.3.8"composer.json 文件

然后运行 终端中的composer update

【讨论】:

    猜你喜欢
    • 2020-01-21
    • 2020-01-30
    • 2019-11-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多