Prce-8.00 安装问题

libtool: line 990: g++: command not found  -------------第0次make错误

因 为要部署几套nginx做负载,在make pcre的时候出现libtool: line 990: g++: command not found错误,第一感觉是gcc没有编译完整,于是,yum -y install g++,无解。于是编译第三方yum源,问题依旧。在于是,yum -y update gcc,再次无解。。。痛下决心。。yum -y install gcc+ gcc-c++。。漫长的等待。完成后再次执行make命令错误消失

[root@hyousoft pcre-8.00]# make ----------------------第一次make报错
make  all-am
make[1]: Entering directory `/usr/app/pcre-8.00'
source='pcrecpp.cc' object='pcrecpp.lo' libtool=yes \
        DEPDIR=.deps depmode=none /bin/sh ./depcomp \
        /bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.      -c -o pcrecpp.lo pcrecpp.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -c pcrecpp.cc  -o .libs/pcrecpp.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -c pcrecpp.cc >/dev/null 2>&1
source='pcre_scanner.cc' object='pcre_scanner.lo' libtool=yes \
        DEPDIR=.deps depmode=none /bin/sh ./depcomp \
        /bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.      -c -o pcre_scanner.lo pcre_scanner.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -c pcre_scanner.cc  -o .libs/pcre_scanner.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -c pcre_scanner.cc >/dev/null 2>&1
source='pcre_stringpiece.cc' object='pcre_stringpiece.lo' libtool=yes \
        DEPDIR=.deps depmode=none /bin/sh ./depcomp \
        /bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.      -c -o pcre_stringpiece.lo pcre_stringpiece.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -c pcre_stringpiece.cc  -o .libs/pcre_stringpiece.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -c pcre_stringpiece.cc >/dev/null 2>&1
/bin/sh ./libtool --tag=CXX   --mode=link g++   -version-info 0:0:0                             -o libpcrecpp.la -rpath /usr/local/lib pcrecpp.lo pcre_scanner.lo pcre_stringpiece.lo libpcre.la
libtool: link: unsupported hardcode properties
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configurationerror.
make[1]: *** [libpcrecpp.la] 错误 1
make[1]: Leaving directory `/usr/app/pcre-8.00'
make: *** [all] 错误 2
解决办法: 再一次:          ./configure            之后执行:make

------------------------------------------------------------------------第二次报错
  /bin/sh ./libtool --tag=CXX   --mode=link g++  -O2 -version-info 0:0:0                             -o libpcrecpp.la -rpath /usr/local/lib pcrecpp.lo pcre_scanner.lo pcre_stringpiece.lo libpcre.la
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.4.4/http://www.cnblogs.com/http://www.cnblogs.com/lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.4/crtbeginS.o  .libs/pcrecpp.o .libs/pcre_scanner.o .libs/pcre_stringpiece.o   -Wl,-rpath -Wl,/usr/app/pcre-8.00/.libs -Wl,-rpath -Wl,/usr/local/lib ./.libs/libpcre.so -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4/http://www.cnblogs.com/http://www.cnblogs.com/lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4/http://www.cnblogs.com/.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.4.4/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.4.4/http://www.cnblogs.com/http://www.cnblogs.com/lib64/crtn.o    -Wl,-soname -Wl,libpcrecpp.so.0 -o .libs/libpcrecpp.so.0.0.0
/usr/bin/ld: .libs/pcrecpp.o: relocation R_X86_64_32S against `.bss'can not be used when making a shared object; recompile with -fPIC
.libs/pcrecpp.o:could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libpcrecpp.la] 错误 1
make[1]: Leaving directory `/usr/app/pcre-8.00'
make: *** [all] 错误 2

解决办法:./configure --disable-shared --with-pic                      之后执行:make 没有错误

posted on 2012-04-11 16:34  mashuaimama  阅读(1714)  评论(0编辑  收藏  举报

导航