cannot open shared object file: No such file or directory解决
./move_db: error while loading shared libraries: libmysqlclient.so.15: cannot
open shared object file: No such file or directory
Step 1: Confirm which Libs cannot be loaded
>ldd move_db
linux-gate.so.1 => (0x0089c000)
libmysqlclient.so.15 => not found
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00cfa000)
libm.so.6 => /lib/libm.so.6 (0x00804000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x009f8000)
libc.so.6 => /lib/libc.so.6 (0x0069e000)
/lib/ld-linux.so.2 (0x0067b000)
Step 2: The system needs to confirm the address of the dynamic library and put the path of the dynamic library in /etc/ld.so.conf
Suggestion: Create a new dynamic library corresponding file configuration file *.conf on /etc/ld.so.conf.d/,
Fill in the absolute path of the dynamic library in this file
This example:
vim /etc/ld.so.conf.d/ld.mysql.so.conf
/usr/local/mysql/lib
Step 3: Run ldconfig to rebuild /etc/ld.so.cache