Laravel 显示“无法清除缓存.确保您拥有适当的权限" [英] Laravel showing "Failed to clear cache. Make sure you have the appropriate permissions"

查看:28
本文介绍了Laravel 显示“无法清除缓存.确保您拥有适当的权限"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Laravel 向我显示用户 'homestead'@'localhost' 的访问被拒绝(使用密码:YES)".一种解决方案是清除缓存和存储的配置缓存,所有这些都使用以下三个命令:

Laravel was displaying to me "Access denied for user 'homestead'@'localhost' (using password: YES)". One solution for this was clearing the cache and the config cache stored, all this with these three commands:

php artisan cache:clear
php artisan config:clear
php artisan config:cache

php artisan cache:clear之后,终端说:

清除缓存失败.确保您拥有适当的权限.(红色背景)

执行第二个和第三个代码(php artisan config:clearphp artisan config:cache)效果很好!但是在输入第一行时它仍然给我错误.谁能解释为什么?

Doing the second and third code (php artisan config:clear and php artisan config:cache) works fine! But it still gives me the error when typing the first line. Can anyone explain why?

推荐答案

如果(storage/framework/cache/data)下不存在data目录,那么您将遇到此错误.

If the data directory doesn't exist under (storage/framework/cache/data), then you will have this error.

这个data目录在全新安装时默认不存在.

This data directory doesn't exist by default on a fresh/new installation.

在 (storage/framework/cache) 手动创建 data 目录应该可以解决此问题.

Creating the data directory manually at (storage/framework/cache) should fix this issue.

这篇关于Laravel 显示“无法清除缓存.确保您拥有适当的权限"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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