yum相关

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

yum相关

1.  yum update的错误处理

[root@os11728 ~]# 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,则需要做如下处理

[root@os11728 ~]# cd /usr/lib

[root@os11728 lib]# ln -sf libz.so.1.2.3 libz.so

[root@os11728 lib]# ln -sf libz.so.1.2.3 libz.so.1

[root@os11728 lib]# yum -y update

 

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

 

[root@os11728 lib]# ln -sf /usr/local/zlib/lib/libz.so.1.2.5 /usr/lib/libz.so

[root@os11728 lib]# ln -sf /usr/local/zlib/lib/libz.so.1.2.5 /usr/lib/libz.so.1

[root@os11728 lib]# ln -sf /usr/local/zlib/lib/libz.so.1.2.5 /lib/libz.so

[root@os11728 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下面。如:

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

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

 

2.  yum 源修改

1)备份源

[root@os11728 ~]# 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/(操作前请做好相应备份)

 

[root@os11728 ~]# cd /etc/yum.repos.d/

[root@os11728 ~]# wget http://mirrors.163.com/.help/CentOS5-Base-163.repo -O CentOS-Base.repo

[root@os11728 ~]# yum makecache #生成缓存

3.  yum 重装

1)查询原先安装的yum

[root@os11728 ~]# 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

[root@os11728 ~]# yum remove yum

[root@os11728 ~]# 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

[root@os11728 ~]# cd /usr/local/src

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

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

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

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

[root@os11728 src]# rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm

[root@os11728 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

[root@os11728 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: