記一次報錯 symlink(): Protocol error 問題處理

zerocoder發表於2020-09-02

環境

window 10

報錯

執行

php artisan storage:link

報錯

vagrant@homestead:~/Code/rental$ php artisan storage:link

   ErrorException  : symlink(): Protocol error

  at /home/vagrant/Code/rental/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:263
    259|      */
    260|     public function link($target, $link)
    261|     {
    262|         if (! windows_os()) {
  > 263|             return symlink($target, $link);
    264|         }
    265|
    266|         $mode = $this->isDirectory($target) ? 'J' : 'H';
    267|

  Exception trace:

  1   symlink("/home/vagrant/Code/rental/storage/app/public", "/home/vagrant/Code/rental/public/storage")
      /home/vagrant/Code/rental/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:263

  2   Illuminate\Filesystem\Filesystem::link("/home/vagrant/Code/rental/storage/app/public", "/home/vagrant/Code/rental/public/storage")
      /home/vagrant/Code/rental/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php:35

  Please use the argument -v to see more details.

解決方法

以管理員身份執行命令列執行 vagrant up 

參考

Laravel – window 10 symlink(): Protocol error 問題處理

本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章