一.
如果遇到类似问题:
configure: error: in `/usr/local/src/gcc-8.2.0/temp':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
解决:
yum install gcc
二. 如果遇到类似问题: configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.,mpfr2.4.0 解决: sudo yum install gmp gmp-devel mpfr mpfr-devel libmpc libmpc-devel
三. 如遇类似问题: configure: error: in `/usr/local/src/gcc-8.2.0/temp/gcc': configure: error: C++ preprocessor "/lib/cpp" fails sanity check
解决:
-
yum install glibc-headers
-
yum install gcc-c++
-
http://abcdxyzk.github.io/blog/2013/10/25/compiler-gcc-make/ https://www.jianshu.com/p/87ebf6e73576 这两网站解决三个依赖的问题......这个提示太不友好了 搞得我以为没装好,,装了三遍(看了这个https://www.jianshu.com/p/87ebf6e73576才发现原来早就好了)
四. 错误: Configuring stage 1 in ./gcc configure: loading cache ./config.cache configure: error: `CXX' has changed since the previous run: configure: former value: `g++' configure: current value: `g++ -std=gnu++98' configure: error: `GMPLIBS' has changed since the previous run: configure: former value: `-lmpc -lmpfr -lgmp' configure: current value: `-L/usr/local/src/gmp-6.1.2/lib/lib -L/usr/local/src/mpc-1.1.0/lib/lib -lmpc -lmpfr -lgmp' configure: error: `GMPINC' has changed since the previous run: configure: former value: `' configure: current value: `-I/usr/local/src/gmp-6.1.2/lib/include -I/usr/local/src/mpc-1.1.0/lib/include ' configure: error: in `/usr/local/src/gcc-8.2.0/temp/gcc': configure: error: changes in the environment can compromise the build configure: error: run `make distclean' and/or `rm ./config.cache' and start over make[2]: *** [configure-stage1-gcc] 错误 1 make[2]: 离开目录“/usr/local/src/gcc-8.2.0/temp” make[1]: *** [stage1-bubble] 错误 2 make[1]: 离开目录“/usr/local/src/gcc-8.2.0/temp” make: *** [all] 错误 2
解决:
暂无
各种方法都报错,试下自带脚本,,,,,,,还是报错,,,弱弱一句,,nmp [root@localhost gcc-8.2.0]# contrib/download_prerequisites wget:无法识别的选项“--no-verbose” 用法: wget [选项]... [URL]... 请尝试使用“wget --help”查看更多的选项。 wget:无法识别的选项“--no-verbose” 用法: wget [选项]... [URL]... 请尝试使用“wget --help”查看更多的选项。 wget:无法识别的选项“--no-verbose” 用法: wget [选项]... [URL]... 请尝试使用“wget --help”查看更多的选项。 wget:无法识别的选项“--no-verbose” 用法: wget [选项]... [URL]... 请尝试使用“wget --help”查看更多的选项。 sha512sum: gmp-6.1.0.tar.bz2: 没有那个文件或目录 gmp-6.1.0.tar.bz2:打开或读取失败 sha512sum: 警告:1 个列出的文件无法读取 error: Cannot verify integrity of possibly corrupted file gmp-6.1.0.tar.bz2 解决方法 :
解决不了.......................能不能让我成功编译啊
附上我的安装过程
../configure --prefix=/usr/local/src/gcc-8.2.0/
--with-mpc=/usr/local/src/mpc-1.1.0/lib
--with-mpfc=/usr/local/src/mpfr-4.0.1/lib
--with-gmp=/usr/local/src/gmp-6.1.2/lib
这一步中间好像也有报错...第一次编译的时候是没有的(编译了一天一夜,是时候换台电脑了).....
The following languages will be built: c,c++,fortran,lto,objc
*** This configuration is not supported in the following subdirectories:
gnattools gotools target-libada target-libhsail-rt target-libgo target-libffi target-liboffloadmic
(Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
*** removing intl/Makefile to force reconfigure
*** removing libiberty/Makefile to force reconfigure
*** removing lto-plugin/Makefile to force reconfigure
这一段不知道是不是报错
然后是make 就报错了 就是上面那个
来个大佬给我说下我哪里错了吧
https://blog.csdn.net/chenjia6605/article/details/82757568 不知道这个能不能装好 我没试 反正我安装了那些东西后没好 还是报错
yum groupinstall -y 'Development Tools'
yum install -y texinfo bison flex gcc-gnat glibc-devel.i686 libgcc.i686
还是熟悉的错误 怎么还没人来看呀 大佬们 快来教我啊
make[1]: 进入目录“/usr/local/src/gcc-8.2.0/temp”
/bin/sh ../mkinstalldirs /usr/local/gcc8.2 /usr/local/gcc8.2
mkdir -p -- /usr/local/gcc8.2 /usr/local/gcc8.2
make[2]: 进入目录“/usr/local/src/gcc-8.2.0/temp/fixincludes”
make[2]: *** 没有规则可以创建目标“install”。 停止。
make[2]: 离开目录“/usr/local/src/gcc-8.2.0/temp/fixincludes”
make[1]: *** [install-fixincludes] 错误 2
make[1]: 离开目录“/usr/local/src/gcc-8.2.0/temp”
make: *** [install] 错误 2