bind升级后,在启动时出错,如下:

Error in named configuration:
/usr/sbin/named-checkconf: error while loading shared libraries: libbind9.so.50: cannot open shared object file: No such file or directory

# nslookup www.g.cn
nslookup: error while loading shared libraries: liblwres.so.50: cannot open shared object file: No such file or directory


查看bind-libs包的文件:
rpm -q --list bind-libs
/usr/lib64/libbind9.so.50
/usr/lib64/libbind9.so.50.0.3
/usr/lib64/libdns.so.50
/usr/lib64/libdns.so.50.2.0
/usr/lib64/libisc.so.50
/usr/lib64/libisc.so.50.1.1
/usr/lib64/libisccc.so.50
/usr/lib64/libisccc.so.50.0.0
/usr/lib64/libisccfg.so.50
/usr/lib64/libisccfg.so.50.0.0
/usr/lib64/liblwres.so.50
/usr/lib64/liblwres.so.50.0.2

再次确认文件:
# whereis libbind9.so.50
libbind9.so: /usr/lib64/libbind9.so.50
# whereis liblwres.so.50
liblwres.so: /usr/lib64/liblwres.so.50

看似没错~
再看下~

# ll /usr/lib64/|grep libbin
lrwxrwxrwx.  1 root root       18 2009-07-04 11:54 libbind9.so.50 -> libbind9.so.50.2.0
-rwxr-xr-x.  1 root root    41808 2009-06-24 22:58 libbind9.so.50.0.3


# ll /usr/lib64/|grep liblw
lrwxrwxrwx.  1 root root       18 2009-07-04 11:54 liblwres.so.50 -> liblwres.so.50.2.0
-rwxr-xr-x.  1 root root    73336 2009-06-24 22:58 liblwres.so.50.0.2

看到了没,一开始看到的都没错,可到最后发现原来此路不通~

解决方法很简单:删除错误的软链接,然后重新建立一个正确的软链接.

rm -f /usr/lib64/libbind9.so.50
rm -f /usr/lib64/liblwres.so.50

ln -s /usr/lib64/libbind9.so.50.0.3 /usr/lib64/libbind9.so.50
ln -s /usr/lib64/liblwres.so.50.0.2 /usr/lib64/liblwres.so.50

-_-这种错误也会犯?