centos下编译gcc的时候报错,没有c编译器
淡淡烟草味
淡淡烟草味 2017-04-25 09:01:10
0
3
905

我通过如下的方式在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是很方便,但是还是喜欢折腾下,看有没有其他的方案!

淡淡烟草味
淡淡烟草味

reply all(3)
黄舟

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template