Red Hat Enterprise Linux Server(RHEL) 的yum服务是付费的,因为没有付费,所以无法使用yum安装软件,会提示如下错误:
[root@vpser ~]# yum install libjpeg libjpeg-devel
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package libjpeg-devel available.
Nothing to do
解决方法:
执行:rpm -qa|grep yum|xargs rpm -e --nodeps 将yum卸载掉
cat /etc/issue && uname -a 看一下系统版本号和系统位数
到 或 找对应系统版本号
如系统是5.5 64位,则打开 找到yum 、yum-fastestmirror、yum-metadata-parser 这3个软件包的地址,然后执行:一下下载地址可能会无法下载,到上面网址找对应的下载文件!
wget
wget
wget
下载下这3个软件包,再执行:
rpm -ivh yum-*
再执行:(如果是6.*的版本,则将下面内容里面的5改成6后再执行。)
cat >/etc/yum.repos.d/CentOS-Base.repo<
[base]
name=CentOS-$releasever - Base
baseurl=
#mirrorlist=
gpgcheck=1
gpgkey=
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=
#mirrorlist=
gpgcheck=1
gpgkey=
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=
#mirrorlist=
gpgcheck=1
gpgkey=
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=
#mirrorlist=
gpgcheck=1
gpgkey=
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=
#mirrorlist=
gpgcheck=1
enabled=0
gpgkey=
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=
#mirrorlist=
gpgcheck=1
enabled=0
gpgkey=
eof
再执行:yum makecache 生成缓存,再yum install 安装软件试试
阅读(1621) | 评论(0) | 转发(1) |