1、問題描敘
本身誤操做刪除/lib64/libpcre.so.0.0.1,致使正則沒法使用(如grep),error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory。node
2、解決問題
1.卸載pcre
rpm -e --nodeps pcre
2.下載pcre rpm包
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/pcre-7.8-7.el6.x86_64.rpm
3.安裝pcre
rpm -ivh pcre-7.8-7.el6.x86_64.rpm centos
其餘系統能夠到http://mirrors.163.com/centos/6/os/x86_64/Packages 網站上找對應的安裝包。有了libpcre.so.0,就能夠安裝pcre最新的庫。