我正在从 CentOS 6.6 上的源代码安装 Bacula。
./configure --prefix=/usr --sysconfdir=/etc/bacula --with-mysql
[root@bacula0 lib]# ldd /usr/sbin/bacula-dir
linux-vdso.so.1 => (0x00007fff65bff000)
libbacfind-7.0.5.so => /usr/lib/libbacfind-7.0.5.so (0x00007ff210081000)
libbacsql-7.0.5.so => /usr/lib/libbacsql-7.0.5.so (0x00007ff20fe58000)
libbaccats-7.0.5.so => not found
libbaccfg-7.0.5.so => /usr/lib/libbaccfg-7.0.5.so (0x00007ff20fc4c000)
您可以看到缺少一个库。我已运行ldconfig -v
。此外还有库列表:
[root@bacula0 lib]# ls -l /usr/lib/libbacc*
lrwxrwxrwx. 1 root root 19 Mar 11 15:17 /usr/lib/libbaccats-7.0.5.so -> libbaccats-mysql.so
-rwxr-xr-x. 1 root root 952 Mar 11 15:17 /usr/lib/libbaccats.la
-rwxr-xr-x. 1 root root 84957 Mar 11 15:17 /usr/lib/libbaccats-mysql-7.0.5.so
-rwxr-xr-x. 1 root root 1027 Mar 11 15:17 /usr/lib/libbaccats-mysql.la
lrwxrwxrwx. 1 root root 25 Mar 11 15:17 /usr/lib/libbaccats-mysql.so -> libbaccats-mysql-7.0.5.so
lrwxrwxrwx. 1 root root 19 Mar 11 15:17 /usr/lib/libbaccats.so -> libbaccats-7.0.5.so
-rwxr-xr-x. 1 root root 130362 Mar 11 15:17 /usr/lib/libbaccfg-7.0.5.so
-rwxr-xr-x. 1 root root 976 Mar 11 15:17 /usr/lib/libbaccfg.la
lrwxrwxrwx. 1 root root 18 Mar 11 15:17 /usr/lib/libbaccfg.so -> libbaccfg-7.0.5.so
怎么了?
答案1
我通过创建 symlinc 来解决这个问题
ln -s /usr/lib/libbaccats-mysql.so /usr/lib64/libbaccats-7.0.5.so