error while loading shared libraries 解决

Today, when configuring a laser SLAM demo, I found that cmake make install is fine, but when the demo is actually run, an error is reported while loading shared libraries: libmetris.so: can not open shared object file: No such file or directory
Reason: Can't find the dynamic library file, you need to do it manually:

sudo ldconfig

ldconfig is a dynamic link library management command whose purpose is to make the dynamic link library shared by the system.
ldconfig usually runs when the system starts, and when the user installs a new dynamic link library, you need to manually run this command.

Guess you like

Origin blog.csdn.net/qq_38337524/article/details/112240997