我想在RHEL5中安装Apache . 在配置httpd-2.4.2后出现以下错误:
configure: error: no acceptable C compiler found in $PATH
所以我下载了gcc-4.7.0并尝试配置它 . 仍然会出现同样的错误 .
$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libitm support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/httproot/gcc-4.7.0':
configure: error: no acceptable C compiler found in $PATH
以下是一些状态结果:
gcc --version
bash: gcc: command not found
rpm -qi gcc
package gcc is not installed
which gcc
/usr/bin/which: no gcc in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/bin:/bin)
whereis gcc
gcc: /usr/libexec/gcc
我不能用 yum
. 所以请帮助解决这个问题 .
2 回答
我找不到以下网址中的任何软件包
http://rpmfind.net//linux/RPM/centos/5.8/x86_64/CentOS/
终于找到了解决方案:
yum groupinstall“开发工具”
要么
yum install gcc glibc glibc-common gd gd-devel
感谢所有帮助过我的人 . 我成功地让gcc工作了 . 我得到了gcc和http://rpmfind.net//linux/RPM/centos/5.8/x86_64/CentOS/的rpm文件