时间:2015-04-02 16:47:49 作者:qipeng 来源:系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20150402/43841.html 手机查看 评论 反馈
修改成如下内容:
[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///yum/iso
# file:///media/cdrom/
# file:///media/cdrecorder/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
注意一下。在这个文件前面的注释里面有这样的内容:
# or for ONLY the media repo, do this:
#
# # or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c5-media [command]
[command]
就是说如果你只想使用本机上的yum源需要运行yum --disablerepo=[red]/[/red]* --enablerepo=c5-media
注意,文档中的斜线方向错了。需要改正。
[root@fom yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@fom yum.repos.d]# yum list
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
Deployment_Guide-zh-CN.noarch 5.2-11.el5.centos installed
Deployment_Guide-zh-TW.noarch 5.2-11.el5.centos installed
GConf2.i386 2.14.0-9.el5 installed
ImageMagick.i386 6.2.8.0-4.el5_1.1 installed
MAKEDEV.i386 3.23-1.2 installed
MySQL-python.i386 1.2.1-1 installed
NetworkManager.i386 1:0.7.0-9.el5 installed
NetworkManager-glib.i386 1:0.7.0-9.el5 installed
NetworkManager-gnome.i386 1:0.7.0-9.el5 installed
…………………………
[root@fom yum.repos.d]# system-config-packages
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
Loading mirror speeds from cached hostfile
上面就是CentOS 5.4添加或删除软件报错的解决方法,如果你遇到了相同的问题,不妨试试本文介绍的方法,轻松解决软件无法删除的难题。
发表评论
共0条
评论就这些咯,让大家也知道你的独特见解
立即评论以上留言仅代表用户个人观点,不代表系统之家立场