Linux: Cannot open shared object file

When you run a program in Linux, you may experience error of:
error while loading shared libraries: cannot open shared object file: No such file or directory

There are couple solutions.

Solution 1
Set environment variable LD_LIBRARY_PATH pointing to the library path.

export LD_LIBRARY_PATH=/usr/local/lib

Solution 2
Edit /etc/ with the below content



Leave a Reply

Your email address will not be published.