Laravel在更新后抛出"bootstrap/cache目录必须存在且可写"错误 [英] Laravel throws 'The bootstrap/cache directory must be present and writable' error after update

查看:1605
本文介绍了Laravel在更新后抛出"bootstrap/cache目录必须存在且可写"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了"composer update",它更新了一些软件包.在更新过程中,网站仍然运行.但是,在显示已删除编译的服务文件"之后,该网站不会加载,而是显示:

I used 'composer update', which updated a few packages. During the updating process the website still functions. However, after it says 'The compiled services file has been removed', the website doesn't load and instead says:

Exception in ProviderRepository.php line 190:
The bootstrap/cache directory must be present and writable.

最奇怪的是,当我再次运行"composer update"时,该网站再次开始工作,直到删除了已编译的服务文件,这时它再次引发了相同的错误.我已经尝试了出现此错误时应该做的通常的事情(将-R所有内容添加到正确的用户/组,并将所有文件和文件夹chmod分别更改为664和775).

The weirdest thing is, when I run 'composer update' again, the website starts to work again, until the compiled services file is removed, at which point it throws the same error again. I have already tried the usual things that should be done when this error appears (chown -R everything to the right user/group and chmod all the files and folders 664 and 775 respectively).

我不知道该怎么办,因为该错误似乎不是正确的".

I don't know what to do anymore, as the error doesn't seem 'correct'..

推荐答案

运行composer更新后,请尝试以下操作:

Try this after you have run the composer update:

php artisan cache:clear

这篇关于Laravel在更新后抛出"bootstrap/cache目录必须存在且可写"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆