gcc configure: error: I suspect your system does not have 32-bit developement libraries (libc and

/usr/bin/ld: cannot find -lgcc

/usr/bin/ld: cannot find -lgcc_s

/usr/bin/ld: cannot find crtn.o: No such file or directory

collect2: error: ld returned 1 exit status

configure: error: I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.

意思是,我電腦默認的編譯配置是32位和64位,但是32位的dev lib不齊全,建議最好關掉32位,進行如下操作:

~/gcc-build/gcc-3.6.0/configure --disable-multilib --enable-languages=c,c++

之後就OK了,所有的cannot find和error都沒了!

 

安裝方法:https://askubuntu.com/questions/864893/update-gcc-to-the-6-3-version

wget https://ftp.gnu.org/gnu/gcc/gcc-6.3.0/gcc-6.3.0.tar.bz2
tar jxvf gcc-6.3.0.tar.bz2
cd gcc-6.3.0
./contrib/download_prerequisites

cd ~
mkdir gcc-build && cd gcc-build
../gcc-6.3.0/configure -v --prefix=$HOME/gcc-6.3.0

make
sudo make install
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章