linux安装gcc,configure出错

来源:百度知道 编辑:UC知道 时间:2024/05/17 01:37:33
安装gcc.tar.gz包,执行configure出错,
[root@localhost gcc-3.4.4]# ./configure --prefix=/usr/local/gcc
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
./configure: line 2339: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

请问是什么原因呢,该如果解决呢
麻烦帮我解释下这个问题为什么出现呢,如何解决呢?

可以这样解这个包:
在/usr/local/建gcc目录
把gcc.tar.gz移动到 /usr/local/gcc
执行 tar -zxvf gcc.tar.gz
进到gcc.tar.gz的目录下
执行make
在执行,make install
就安装OK了

你是怎么解决的帮帮吧 怎么系统配置啊 谢谢

很早以前,我也遇到了你所说的情况,问题出在configure命令执行的目录不对。
去我的blog上看一下吧,关于gcc的安装,写的比较详细:
http://hi.baidu.com/ronen/blog/item/415761c272066431e5dd3b15.html

看样子是没有装gcc,怎么编译gcc啊

还是用你那个发行版提供的gcc啦

免麻烦