no such file

Symlink Problem: No Such File

I pulled a laravel project from GitHub that already have the storage symbolic link. Upon running it the browser, the images associated with the post came with errors. And after trying to create the symbolic again I had symlink(): no such file or directory.

After searching extensively, I found a solution on how to solve the problem of symlink(): no such file or directory. To fix this error on your server, change directory to the public and remove the symbolic link for the storage folder.

The following commands will help you remove the symbolic link from the public folder:

cd public 
rm storage

After removing the symbolic link change directory to the main folder using:

cd ..

Now create the symbolic link with the following command:

php artisan storage:link

After running the command successfully, you should get the following message

The [public/storage] directory has been linked.

I hope this post helps you. Then, you can check out the following post on How to format date with accessors and mutators in laravel.

Leave a Reply

Your email address will not be published. Required fields are marked *

Attach images – Only PNG, JPG, JPEG and GIF are supported.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Quote of the week

"People ask me what I do in the winter when there's no baseball. I'll tell you what I do. I stare out the window and wait for spring."

~ Rogers Hornsby

All rights resolved