Prce-8.00 安装问题

在安装Nginx的过程中,遇到Pcre包无法安装的问题

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/…/…/…/…/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/…/…/…/…/lib64 -L/lib/…/lib64 -L/usr/lib/…/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.4/…/…/… -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/…/…/…/…/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 没有错误

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值