安装memtester报错:./compile: line 3: exec: cc: not found解决办法

[root@localhost memtester-4.2.2]# make
( cat warn-auto.sh; \
echo CC=\'`head -1 conf-cc`\'; \
echo LD=\'`head -1 conf-ld`\' \
) > auto-ccld.sh
cat auto-ccld.sh make-compile.sh > make-compile
chmod 755 make-compile
cat auto-ccld.sh find-systype.sh > find-systype
chmod 755 find-systype
./find-systype > systype
( cat warn-auto.sh; ./make-compile "`cat systype`" ) > \
compile
chmod 755 compile
./compile memtester.c

./compile: line 3: exec: cc: not found

解决:

yum install gcc

找不到安装包,更新yum源为

wget http://mirrors.163.com/.help/CentOS5-Base-163.repo

yum makecache报错:

[root@localhost yum.repos.d]# yum makecache

Loaded plugins: fastestmirror
Determining fastest mirrors
http://mirrors.163.com/centos/5Server/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

以为是DNS解析有问题,于是vim /etc/resolv.conf

nameserver 114.114.114.114
nameserver 8.8.8.8

修改dns后仍未解决问题

修改yum源为:

wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

仍存在相同的问题


于是访问http://mirrors.163.com,发现centos5.5的相关说明(5.5的源已不再更新,若要使用使用:go to http://vault.centos.org/ for packages):

This directory (and version of CentOS) is deprecated.  For normal users,

you should use /5/ and not /5.5/ in your path. Please see this FAQ
concerning the CentOS release scheme:


https://wiki.centos.org/FAQ/General


If you know what you are doing, and absolutely want to remain at the 5.5
level, go to http://vault.centos.org/ for packages. Please keep in mind that 5.5 no longer gets any updates

于是修改yum源文件,vi /etc/yum.repos.d/CentOS5-Base-163.repo 

[base]
name=CentOS-$releasever - Base - org.com
baseurl=http://vault.centos.org/5.5/os/x86_64/
gpgcheck=1
gpgkey=http://vault.centos.org/5.5/os/x86_64/RPM-GPG-KEY-CentOS-5

其余内容注释掉

再使用yum makeche就不再报错了,安装软件成功


备注:

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897警告是由于安装了旧版本的GPG keys

自动导入:

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
base/gpgkey                                                                                                                     | 1.5 kB     00:00     
Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>" from http://vault.centos.org/5.5/os/x86_64/RPM-GPG-KEY-CentOS-5
Is this ok [y/N]: y

手动导入:

rpm --import /etc/pki/rpm-gpg/RPM*






  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值