Elie Morin
Elie Morin

Reputation: 1514

Laravel 5.3 storage:link -> symlink(): Protocol error

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

Answers (9)

user14843148
user14843148

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

ii iml0sto1
ii iml0sto1

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

Ing Oscar MR
Ing Oscar MR

Reputation: 779

enter image description here

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 .

enter image description here

I had to migrate my proyect to the storage with NTFS format.

enter image description here

I'm working with Docket, Laravel sail, Ubuntu 20.04 and voyager (is an admin panel for laravel) .

enter image description here

Upvotes: 0

Marcin
Marcin

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

sabbir ahmed
sabbir ahmed

Reputation: 87

Try to run php artisan storage:link from host machine. This will wok

Upvotes: 2

tanteng
tanteng

Reputation: 668

enter image description here

Run cmd as Super Admin.

php artisan storage:link is OK.

Upvotes: 2

Alexandru Dumitru
Alexandru Dumitru

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

Mia de la Vega
Mia de la Vega

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

bleenders
bleenders

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

Related Questions