centos 安裝pcre報c++編譯器錯誤

來源:互聯網
上載者:User

標籤:

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++編譯器錯誤

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.