Reputation: 1514
I'm trying to run the following artisan command:
php artisan storage:link
I get this error:
[ErrorException]
symlink(): Protocol error
Can you help me to solve this.
This is my setup:
Upvotes: 29
Views: 34591
Reputation: 1
this solution worked for me : update your PHP on you computer (i.e. download from php.net) then open cmd as admin cd homestead -> vagrant up -> vagrant ssh -> cd code -> cd "your-APP" sudo apt update -> sudo apt upgrade exit (return to cmd) cd code -> cd "your-APP" -> php artisan storage:link
Upvotes: 0
Reputation: 1742
If you continue to have this problem after you tried running CMD as admin, but had no luck.
Chances are that you use predis/redis, go to your .env file and put the standard drivers
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DRIVER=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
Now halt your vagrant/homestead box, run homestead/vagrant up, try again and woopti :)
Now change back the drivers to redis
Upvotes: 0
Reputation: 779
I spended a lot of time solving this problem, in my case my project was in a drive of storage with exFat format and on Window the command for make symbolic links is
mklink \J
and this only works on storage drives with NTFS format .
I had to migrate my proyect to the storage with NTFS format.
I'm working with Docket, Laravel sail, Ubuntu 20.04 and voyager (is an admin panel for laravel) .
Upvotes: 0
Reputation: 323
In my case I run vagrant as Administrator and is working.
Do not forget to vagrant halt on other machine and start new as administrator.
php artisan storage:link
Output:
The [/home/vagrant/code/public/storage] link has been connected to [/home/vagrant/code/storage/app/public].
The links have been created.
Upvotes: 1
Reputation: 87
Try to run php artisan storage:link
from host machine. This will wok
Upvotes: 2
Reputation: 71
First close vagrant with vagrant halt
command, then run cmd as administrator, go to your homestead folder, start Vagrant with vagrant up
and then you can run php artisan storage:link
.
For me it worked :)
Upvotes: 5
Reputation: 1
You must login as cmd administrator, to do this click on the windows key and X. Then select the administrator system symbol. Do not forget to give her vagrant halt at the other terminal.
Upvotes: 0
Reputation: 920
Your problem probably is that you have to start your vagrant box as a system administrator.
So hit start type "cmd", right click it choose "Run as administrator". Navigate to your project, type "vagrant up". Retry the command.
Creating symbolic link on Homestead?
Upvotes: 78