Repairing broken symbolic link (linux)

A symbolic link may become broken due to updating/compiling/installing software, showing up as red text in ls in Terminal. Let’s suppose our broken link is named “foo.so”

  1. find where link pointed to:

    readlink -v foo.so
    
  2. Determine where link should point do (e.g. a new version of the old file), lets say foo2.so
  3. Update link:

    ln -sfn foo2.so foo.so
    

Now you have your foo.so showing up as a light blue file in terminal, pointing to foo2.so

Categories:

Updated:

Leave a Comment