1 error while loading shared libraries: libzlog.so.1.2: cannot open shared object file: No such file or directory

    I have a project that uses zlog. There are no errors while compiling, but I got this if I try to execute it:
    error while loading shared libraries: libzlog.so.1.2: cannot open shared object file: No such file or directory
    I can find the .so library in /usr/local/lib, and I have added link_directories(/usr/local/lib) to Cmakelists.txt
    The LD_LIBRARY_PATH environment variable has been setted to /usr/local/lib

    解决办法:
    I am running the project on Ubuntu, and after executing sudo /sbin/ldconfig -v, the error disappears.