[英]Install g++ from source in Fedora 26
I am trying to install a c++ compiler on a IBM Power7 with Fedora 26. In /usr/bin it is installed gcc [(GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)]
but it has not the c++ compiler (I tried gcc -lstdc++
but the result is: ` 我正在尝试使用Fedora 26在IBM Power7上安装c ++编译器。在/ usr / bin中,它安装了gcc
[(GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)]
但它没有c ++编译器(我尝试了gcc -lstdc++
但结果是:
/usr/bin/ld: cannot find -lstdc++
/ usr / bin / ld:找不到-lstdc ++
I do not have sudo rights so I have to install everything from source. 我没有sudo权限,因此我必须从源代码安装所有内容。 I was able to install:
我能够安装:
but when I try to install locally gcc, after a successfull configure
, when I try make
I got this error: 但是当我尝试在本地安装gcc时,在成功
configure
,当我尝试make
我得到此错误:
configure: error: in `/home/aantonietti/gcc/host-powerpc64-unknown-linux-gnu/gcc':
配置:错误:在/ home / aantonietti / gcc / host-powerpc64-unknown-linux-gnu / gcc中:
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
配置:错误:C ++预处理器“ / lib / cpp”未能通过健全性检查
See `config.log' for more details.
有关更多详细信息,请参见`config.log'。
make[2]: *** [Makefile:4333: configure-stage1-gcc] Error 1
make [2]:*** [Makefile:4333:configure-stage1-gcc]错误1
make[2]: Leaving directory '/home/aantonietti/gcc'
make [2]:离开目录'/ home / aantonietti / gcc'
make[1]: *** [Makefile:23745: stage1-bubble] Error 2
make [1]:*** [Makefile:23745:stage1-bubble]错误2
make[1]: Leaving directory '/home/aantonietti/gcc'
make [1]:离开目录'/ home / aantonietti / gcc'
make: *** [Makefile:945: all] Error 2
制作:*** [Makefile:945:全部]错误2
I also tried to install clang++
but it needs tons of other dependecies. 我也尝试安装
clang++
但它需要大量其他依赖。
Do you have any hint on how to install just the gcc-c++
compiler? 关于如何仅安装
gcc-c++
编译器,您有任何提示吗?
Why don't you run dnf install gcc-c++
? 为什么不运行
dnf install gcc-c++
? It will install the C++ system compiler bring in linking support for libstdc++
as well. 它将安装C ++系统编译器,同时也为
libstdc++
提供链接支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.