redhat 安装memchche时的gcc问题
在安装memcache时,执行到命令make时 ,报错如下 configure: error: in `/home/gaotingting/memcache/libevent-1.4.14b-stable': configure: error: no acceptable C compiler found in $PATH 没有安装c编译器
解决办法:
可搜索以采用yum方式安装,则采用如下命令安装gcc编译器即可: # yum -y install gcc
安装更新了如下几个组件: gcc 4.1.2-44.el5
binutils 2.17.50.0.6-9.el5
cpp 4.1.2-44.el5
glibc-devel 2.5-34.el5_3.1
glibc-headers 2.5-34.el5_3.1
kernel-headers 2.6.18-164.el5
libgomp 4.3.2-7.el5
执行这个命令又报了如下错误
No package gcc available. Nothing to do
解决方案:
1.卸载redhat自带的yum组件
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
2.安装centos的yum包
[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm [root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-16.el5.centos.noarch.rpm [root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-37.el5.centos.noarch.rpm [root@localhost ~]# rpm -ivh *.rpm warning: yum-3.2.22-37.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897 Preparing... ########################################### [100%] 1:yum-metadata-parser ########################################### [ 33%] 2:yum-fastestmirror ########################################### [ 67%] 3:yum ########################################### [100%]
3. 下载更新源,并存放在系统目录中 [root@localhost ~]# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
[root@localhost ~]#mv CentOS_Base.repo /etc/yum.repos.d/CentOS-Base.repo
4.生成缓存并进行安装
[root@localhost ~]# yum makecache [root@localhost ~]# yum install httpd
浙公网安备 33010602011771号