我通过如下的方式在centos下编译安装gcc
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.9.1/gcc-4.9.1.tar.gz
tar zxvf gcc-4.9.1.tar.gz
cd gcc
./contrib/download_prerequisites
mkdir gcc-bulid
../gcc/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
感觉有点矛盾,想要安装c/c++编译器,然后需要c编译器
不知大家有没有什么遇到过或者知道有什么解决方案的呢?
在一些帖子上有用yum安装gcc是很方便,但是还是喜欢折腾下,看有没有其他的方案!
The first version of the C compiler must have been written in assembly. Later, it was rewritten in C when a usable binary version was available. This achieved "self-support", similar to git.
Generally, Linux distributions come with GCC, so don’t worry, just use yum.
Of course you can use yum to install the packaged GCC directly, but if you want to compilea GCC yourself... there is no other way... you always need a GCC to compile a new GCC with this GCC.
If you want to compile gcc, you must first have g++ to compile the gcc code...
This is an unsolvable "chicken-and-egg" problem.