Rzrk:~/luzhi # ldconfigldconfig: /usr/local/lib/libsvn_fs_base-1.so.0 is not a symbolic linkldconfig: /usr/local/lib/libcharset.so.1 is not a symbolic linkldconfig: /usr/local/lib/libpcrecpp.so.0 is not a symbolic Linkldconfig: /usr/local/lib/libzookeeper_mt.so.2 is not a symbolic linkldconfig : /usr/local/lib/libzookeeper_st.so.2 is not a symbolic linkldconfig: /usr/ local/lib/libluajit-5.1.so.2 is not a symbolic linkldconfig: /usr/local/lib/ libsqlite3.so.0 is not a symbolic linkldconfig: /usr/local/lib/libpcreposix.so.0 is not a symbolic linkldconfig: /usr/local/lib/libprotobuf.so.8 is not a symbolic linkldconfig: /usr/local/lib/libiconv.so.2 is not a symbolic linkldconfig: /usr/local/lib/libpcre.so.1 is not a symbolic linkldconfig: /usr/local/lib/ libexpat.so.1 is not a symbolic linkldconfig: /usr/local/lib/libbsoncpp.so.0 is not a symbolic linkldconfig: /usr/local/lib/liblog4cxx.so.10 is Not a symbolic linkldconfig: /usr/local/lib/libprotobuf-lite.so.8 is not a symbolic linkldconfig: /usr/local/lib/librabbitmq.so.1 is not a symbolic linkldconfig: /home/rzrk/server/lib/libaprutil-1.so.0 is not a symbolic Linkldconfig: /home/rzrk/server/lib/libapr-1.so.0 is not a symbolic link
When we use the Ldconfig command in this case, the description is the library file naming problem, so we have to do a software link.
#!/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 $n 1. $n 3. $n 2 " done fi ldconfig
rzrk:~/luzhi #chmod +x 1.shrzrk:~/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 '
This article is from the "Tiandaochouqin" blog, make sure to keep this source http://8855546.blog.51cto.com/8845546/1641977
Use Shell to bulk change library file name, soft link to. So end