centos 安装pcre报c++编译器错误

gcc已经安装了但是还报c++编译器不支持的错误。

于是找到如下组件安装:

yum install gcc-c++

再次安装pcre成功。

附:centos上源码安装gcc

http://my.oschina.net/vaero/blog/210485

 

# issue: configure: error: C++ compiler missing or inoperational
# 没有C++编译器
yum install gcc-c++

# issue: conftest.cpp:11:2: error: #error -static-libstdc++ not implemented
# 没有C,C++静态库
yum install glibc-static libstdc++-static -y
# 但报"No package libstdc++-static available",即没有-static-libstdc++源,问题仍存在。
# "checking whether g++ accepts -static-libstdc++ -static-libgcc"时报出的,可忽略。

# issue: conftest.c:10:25: error: isl/version.h: No such file or directory
# 没有ISL
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.12.2.tar.bz2
tar jxvf isl-0.12.2.tar.bz2
cd isl-0.12.2; ./configure
make; make install
cd ..

# issue: ./conftest: error while loading shared libraries: libisl.so.10: cannot open shared object file: No such file or directory
# 在"/usr/local/lib"目录下,怎么就它找不到。加到"/etc/ld.so.conf"或用"LD_LIBRARY_PATH"。
vi /etc/ld.so.conf  # 添加"/usr/local/lib"
ldconfig  # 重建/etc/ld.so.cache
# 自问:于**Issue 1**里,已经单独在"/etc/ld.so.conf.d"下建个"*.conf"添加过"/usr/local/lib",怎么没效果呢?
# 自答:之后安装的ISL,没重新ldconfig,所以找不到了?当时没查,不能确认。用以下命令:
strings /etc/ld.so.cache | grep libisl  # 查看
# 之后,删除了"/etc/ld.so.conf"内的添加,也不再有该问题。

转载于:https://www.cnblogs.com/i-shu/p/4731585.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值