CentOSmini安裝gcc8.2

一.
若是遇到相似問題:

    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.c++

解決:

   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


解決:
    1.   yum install glibc-headers
    2.   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


解決方法 :
    解決不了.......................能不能讓我成功編譯啊

 附上個人安裝過程  git

../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 reconfiguregithub

這一段不知道是否是報錯

  而後是make 就報錯了 就是上面那個

來個大佬給我說下我哪裏錯了吧  bootstrap

 

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.i686promise

 

 

仍是熟悉的錯誤 怎麼還沒人來看呀 大佬們 快來教我啊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
相關文章
相關標籤/搜索