标签:local
rzrk:~/luzhi # ldconfig ldconfig: /usr/local/lib/libsvn_fs_base-1.so.0 is not a symbolic link ldconfig: /usr/local/lib/libcharset.so.1 is not a symbolic link ldconfig: /usr/local/lib/libpcrecpp.so.0 is not a symbolic link ldconfig: /usr/local/lib/libzookeeper_mt.so.2 is not a symbolic link ldconfig: /usr/local/lib/libzookeeper_st.so.2 is not a symbolic link ldconfig: /usr/local/lib/libluajit-5.1.so.2 is not a symbolic link ldconfig: /usr/local/lib/libsqlite3.so.0 is not a symbolic link ldconfig: /usr/local/lib/libpcreposix.so.0 is not a symbolic link ldconfig: /usr/local/lib/libprotobuf.so.8 is not a symbolic link ldconfig: /usr/local/lib/libiconv.so.2 is not a symbolic link ldconfig: /usr/local/lib/libpcre.so.1 is not a symbolic link ldconfig: /usr/local/lib/libexpat.so.1 is not a symbolic link ldconfig: /usr/local/lib/libbsoncpp.so.0 is not a symbolic link ldconfig: /usr/local/lib/liblog4cxx.so.10 is not a symbolic link ldconfig: /usr/local/lib/libprotobuf-lite.so.8 is not a symbolic link ldconfig: /usr/local/lib/librabbitmq.so.1 is not a symbolic link ldconfig: /home/rzrk/server/lib/libaprutil-1.so.0 is not a symbolic link ldconfig: /home/rzrk/server/lib/libapr-1.so.0 is not a symbolic link
当我们使用ldconfig命令出现这种情况的时候,说明是库文件命名有问题,所以我们要做一个软件链接。
#!/bin/bash ld_path=/root/ld.txt ldconfig &> $ld_path sed -i ‘/^ *$/d‘ $ld_path if test `wc -l $ld_path | awk ‘{print $1}‘` -eq 0 then echo “allisok...” else cat $ld_path | awk ‘{ print$2 }‘ | while read line do n1=`echo $line | awk -F ‘.‘ ‘{ print$1 }‘` n2=`echo $line | awk -F ‘.‘ ‘{print$2}‘` n3=`echo $line | awk -F ‘.‘ ‘{print$3}‘` ln -sv $line "$n1.$n3.$n2" done fi ldconfig
rzrk:~/luzhi #chmod +x 1.sh rzrk:~/luzhi # ./1.sh `/usr/local/lib/libsvn_fs_base-1.0.so‘ -> `/usr/local/lib/libsvn_fs_base-1.so.0‘ `/usr/local/lib/libcharset.1.so‘ -> `/usr/local/lib/libcharset.so.1‘ `/usr/local/lib/libpcrecpp.0.so‘ -> `/usr/local/lib/libpcrecpp.so.0‘ `/usr/local/lib/libzookeeper_mt.2.so‘ -> `/usr/local/lib/libzookeeper_mt.so.2‘ `/usr/local/lib/libzookeeper_st.2.so‘ -> `/usr/local/lib/libzookeeper_st.so.2‘ `/usr/local/lib/libluajit-5.so.1‘ -> `/usr/local/lib/libluajit-5.1.so.2‘ `/usr/local/lib/libsqlite3.0.so‘ -> `/usr/local/lib/libsqlite3.so.0‘ `/usr/local/lib/libpcreposix.0.so‘ -> `/usr/local/lib/libpcreposix.so.0‘ `/usr/local/lib/libprotobuf.8.so‘ -> `/usr/local/lib/libprotobuf.so.8‘ `/usr/local/lib/libiconv.2.so‘ -> `/usr/local/lib/libiconv.so.2‘ `/usr/local/lib/libpcre.1.so‘ -> `/usr/local/lib/libpcre.so.1‘ `/usr/local/lib/libexpat.1.so‘ -> `/usr/local/lib/libexpat.so.1‘ `/usr/local/lib/libbsoncpp.0.so‘ -> `/usr/local/lib/libbsoncpp.so.0‘ `/usr/local/lib/liblog4cxx.10.so‘ -> `/usr/local/lib/liblog4cxx.so.10‘ `/usr/local/lib/libprotobuf-lite.8.so‘ -> `/usr/local/lib/libprotobuf-lite.so.8‘ `/usr/local/lib/librabbitmq.1.so‘ -> `/usr/local/lib/librabbitmq.so.1‘ `/home/rzrk/server/lib/libaprutil-1.0.so‘ -> `/home/rzrk/server/lib/libaprutil-1.so.0‘ `/home/rzrk/server/lib/libapr-1.0.so‘ -> `/home/rzrk/server/lib/libapr-1.so.0‘
本文出自 “天道酬勤” 博客,请务必保留此出处http://8855546.blog.51cto.com/8845546/1641977
标签:local
原文地址:http://8855546.blog.51cto.com/8845546/1641977