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.

解決:

   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


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

 附上我的安裝過程  

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM