--nodeps强制删除pcre后再安装报错

pcre-8.31.tar.gz 
[root@lamp ~]# tar xf pcre-8.31.tar.gz 
[root@lamp ~]# cd pcre-8.31
[root@lamp pcre-8.31]# ./configure --prefix=/usr/local/pcre
有错误:
“checking how to run the C preprocessor... grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
gcc -E
grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
checking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/xpg4/bin”
在安装pcre时我先把系统里旧版本的pcre用"rpm -e pcre --nodeps"卸载,再编译安装时就出现上面的错误,网上说是把Libpcre.so.0这个文件建个链接,但是搜索发现我系统里根本就没有这个文件,后来下载rpm安装也不行,有许多的依赖关系还要处理,最后用“yum -y install pcre”安装了一个低版本的pcre,再编译安装pcre-8.31时成功了,我想可能是卸载时加了--nodeps出了问题。

你可能感兴趣的:(Linux)