This error drove me crazy for the longest time. I was using Vagrant, FreeBSD and Laravel for a project and laravel would not run because of where it stores the cache. It took awhile for me to find a good fix but it is fairly easy.
In your /etc/rc.conf file add two lines:
Restart your vagrant instance and it’s all working now.
You can also update your vagrant file to put those values in when it’s created. Below is my Vagrantfile for new projects: