標籤:
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"內的添加,也不再有該問題。
centos 安裝pcre報c++編譯器錯誤