NutzCN Logo
问答 centos 安装PCRE的时候出错,怀疑和gcc有关系,求围观指导
发布于 3006天前 作者 SayingCode 3232 次浏览 复制 上一个帖子 下一个帖子
标签:

我的安装步骤
1.#yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
2.#wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
3.#tar zxvf pcre-8.35.tar.gz
4. #cd pcre-8.35
5.#./configure

在本地服务器上出现
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) none
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none

主要错误在
checking dependency style of gcc... none
checking dependency style of g++... none

同样的步骤在阿里云上就是正常的
正常提示信息是
checking dependency style of gcc... gcc3
checking dependency style of g++... gcc3

我查看了本地gcc版本

gcc --version

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
Copyright © 2010 Free Software Foundation, Inc.

已经折腾一下午,求指导。。。 不然nginx装不了。。。 我的图片上传服务器也就。。。

6 回复

No, 你贴的没一行是报错.

要贴就贴完整.

[root@renxin pcre-8.38]# ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) none
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
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/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/xpg4/bin
[root@renxin pcre-8.38]# 
checking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/xpg4/bin

这才是报错.

他的意思是, grep依赖pcre, 你得先安装一个老版本的pcre,才能编译新版的pcre

正解
#yum install pcre  安装老版本
然后
#./configure

成功

鸣谢牛逼哄哄的大鲨鱼
添加回复
请先登陆
回到顶部