打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
安装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*






本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
CentOS6的yum源失效官方停止维护更新及解决
centos6下安装php-fpm
配置RedHat使用163的yum源
CentOS 7 安装教程、硬盘分区、LVM、网络配置、软件源配置、制作
CentOS下yum安装、源的选择及介绍
解决Redhat Linux5 yum出现This system is not registered with RHN的方案 | 黄克业的博客
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服