symlink(): No such file or directory laravel ubuntu – solved

Share Me
  •  
  •  
  •  
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

Hello Dev’s, Today in this article, I will show how to solve No such file or directory laravel ubuntuIf we are working on an application and we wanted to implement image uploading to our application. So now we will display a symbolic link error on our composer.

So Now in this article, we will find the best solution for this issue:

ErrorException  : symlink(): No such file or directory

 at /home/forge/example.com/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:252
   248|      */
   249|     public function link($target, $link)
   250|     {
   251|         if (! windows_os()) {
 > 252|             return symlink($target, $link);
   253|         }
   254|
   255|         $mode = $this->isDirectory($target) ? 'J' : 'H';
   256|

 Exception trace:

 1   symlink("/home/forge/example.com/storage/app/public", "/home/forge/example.com/public/storage")
     /home/forge/example.com/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:252

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

 Please use the argument -v to see more details.

So Run Following Commands:

step 1 : Go to /public directory and run

rm storage

step 2 : Go to Laravel root directory and run

php artisan storage:link

Read More : How to Load More Data on Page Scroll by using Ajax Jquery Laravel ?

Thanks for read. I hope it help you. For more you can follow us on facebook

About Shahriar Sagor

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by Shahriar Sagor →