在搭建Laravel 5.7版本以上的项目中使用清除缓存命令:
php artisan cache:clear
有时候会出现以下报错:
“Failed to clear cache. Make sure you have the appropriate permissions”
原因是差个目录,需要新建一个目录,就可以了。
mkdir -p storage/framework/cache/data
同时你需要设置目录权限
chmod 777 /home/www/dir/bootstrap/cache && chmod 777 /home/www/dir/bootstrap/cache/*
参考:
“Failed to clear cache. Make sure you have the appropriate permissions” in Laravel 5.7_阳水平的博客-优快云博客
本文介绍了在Laravel 5.7及以上版本中遇到'Failed to clear cache'错误时,如何解决由于缺少缓存目录权限和创建新目录的问题。详细步骤包括创建'mkdir-p storage/framework/cache/data'并设置相应权限chmod 777。
1223

被折叠的 条评论
为什么被折叠?



