1. 查找二进制文件所链接的lib位置:
[mitc@mitc lib]$ ldd /home/mitc/XXX/conn
linux-vdso.so.1 => (0x00007fffc0dff000)
libmysqlclient.so.16 => /usr/lib64/mysql/libmysqlclient.so.16 (0x0000003fd6200000)
libhiredis.so.0.10 => /usr/lib64/libhiredis.so.0.10 (0x00007f0df0b0a000)
libmemcached.so.11 => /usr/lib64/libmemcached.so.11 (0x00007f0df08cb000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003fdca00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003fd5e00000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003fd9600000)
libc.so.6 => /lib64/libc.so.6 (0x0000003fd4e00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003fd5600000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003fd7e00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003fdf200000)
libssl.so.10 => /usr/lib64/libssl.so.10 (0x0000003fdce00000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x0000003fdb600000)
libz.so.1 => /lib64/libz.so.1 (0x0000003fd5a00000)
librt.so.1 => /lib64/librt.so.1 (0x00007f0df06c0000)
/lib64/ld-linux-x86-64.so.2 (0x0000003fd4a00000)
libfreebl3.so => /usr/lib64/libfreebl3.so (0x0000003fd8200000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x0000003fdba00000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x0000003fd9a00000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003fd8600000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x0000003fd8a00000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003fd5200000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x0000003fd9200000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003fd8e00000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003fd6e00000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003fd6600000)