yum相关

  • A+
所属分类:系统文档

yum相关

1.  yum update的错误处理

[[email protected] ~]# yum -y update

Setting up Update Process

Setting up repositories

Segmentation fault

出现” Segmentation fault”错误提示

问题产生的原因:

安装的zlib1.2.5时指定了安装目录(./configure -prefix=/usr/local/zlib)对yum产生了影响,总结如下:

 

1、安装完系统后,运行一次#yum updateyum产生了缓存),然后再安装zlib1.2.5,之后如果不执行#yum clean all,则一直可以使用yum,不会报段错误

 

2、如果已经安装了zlib1.2.5,则需要做如下处理

[[email protected] ~]# cd /usr/lib

[[email protected] lib]# ln -sf libz.so.1.2.3 libz.so

[[email protected] lib]# ln -sf libz.so.1.2.3 libz.so.1

[[email protected] lib]# yum -y update

 

此后zlib就使用了旧版本,在成功执行了yum后,还需要将软连接更改

 

[[email protected] lib]# ln -sf /usr/local/zlib/lib/libz.so.1.2.5 /usr/lib/libz.so

[[email protected] lib]# ln -sf /usr/local/zlib/lib/libz.so.1.2.5 /usr/lib/libz.so.1

[[email protected] lib]# ln -sf /usr/local/zlib/lib/libz.so.1.2.5 /lib/libz.so

[[email protected] lib]# ln -sf /usr/local/zlib/lib/libz.so.1.2.5 /lib/libz.so.1

 

至此,问题解决!

 

若按以上方法仍不能解决问题,则可从其它机器复制以下文件:

/lib/libz.so

/lib/libz.so.1

/lib/libz.so.1.2.3

至当前机器的目录/lib/usr/lib下面。如:

[[email protected] ~]# scp -r [email protected]:/lib/libz.so* /usr/lib

[[email protected] ~]# scp -r [email protected]:/lib/libz.so* /lib

 

2.  yum 源修改

1)备份源

[roo[email protected] ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

 

2)下载并修改源

 

http://mirrors.163.com/.help/centos.html 下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)

 

[[email protected] ~]# cd /etc/yum.repos.d/

[[email protected] ~]# wget http://mirrors.163.com/.help/CentOS5-Base-163.repo -O CentOS-Base.repo

[[email protected] ~]# yum makecache #生成缓存

3.  yum 重装

1)查询原先安装的yum

[[email protected] ~]# rpm -qa|grep yum

yum-3.2.22-37.el5.centos

yum-fastestmirror-1.1.16-16.el5.centos yum-updatesd-0.9-2.el5

yum-metadata-parser-1.1.2-3.el5.centos

 

2)删除yum

[[email protected] ~]# yum remove yum

[[email protected] ~]# rpm -e –nodeps yum-3.2.22-37.el5.centos yum-fastestmirror-1.1.16-16.el5.centos yum-updatesd-0.9-2.el5 yum-metadata-parser-1.1.2-3.el5.centos

 

3)安装yum

[[email protected] ~]# cd /usr/local/src

[[email protected] src]# wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm

[[email protected] src]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm

[[email protected] src]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm

[[email protected] src]# wget http://mirror.centos.org/centos-5/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

[[email protected] src]# rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm

[[email protected] src]# rpm -ivh yum-3.2.22-39.el5.centos.noarch.rpm yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm

[[email protected] src]# wget http://sudone.com/download/CentOS-Base.repo -O /etc/yum.repos.d/CentOS-Base.repo

 

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: