./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)
Is this ok [y/N]: y
手动导入:
rpm --import /etc/pki/rpm-gpg/RPM*