error while loading shared libraries [How to Solve]

When running the program, the following errors occur:

 error while loading shared libraries: cannot open shared object file: No such file or directory

1. First open the/etc/ file

2. Add the directory where the dynamic library file is located: execute VI/etc/, and add “/usr/local/lib” under “include LD.So.Conf.d/*.Conf”.

3. After saving, execute:/SBIN/ldconfig – V on the command line terminal; Its function is to cache the library files under the path listed in the file/etc/ to/etc/ for use. Therefore, when some library files are installed or/etc/ is modified to add a new search path for the library, it is necessary to run ldconfig to cache all library files into the file/etc/ If it is not done, the newly installed library may not be found.

Read More: