首页 > 系统服务 > 详细

误删除系统libselinux.SO.1,导致系统命令基本上都不能使用--附解决问题的整个过程

时间:2016-01-09 06:24:03      阅读:5579      评论:0      收藏:0      [点我收藏+]

现象:

 yum install openssl*
Error: Protected multilib versions: libselinux-2.0.94-5.2.el6.i686 != libselinux-2.0.94-5.3.el6.x86_64

使用了一个很傻x的方法,如下:

rpm --erase --nodeps libselinux-2.0.94-5.3.el6_4.1.i686

#根据Linux系统给的提示进行的操作之后,发现悲剧就此发生。


error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory

系统命令无法使用,远程连接无法连接,不敢重启了已经。马上百度解决。。。。

此过程中借鉴大神:

http://www.linuxsa.cn/phenomenon-mistaken-delete-system-libselinux-package-cause-the-system-command-basically-cannot-use-rpm-vi-vim-ls-ps-etc-with-the-whole-process-of-solving-problems.html

的方法,并根据自己的情况进行了复杂的调整。目前认为,各位照着这个做,应该可以解决问题。


方法如下

服务端


1.

cat > /etc/rsyncd.conf <<EOF


port = 873

uid = root

gid = root

use chroot = yes

read only = yes

#limit access to private LANs

max connections =10

pid file = /var/run/rsyncd.pid

log file = /var/log/rsyncd.log

timeout = 300


[tmp]

path = /tmp/

list = yes

auth users = root

uid = root

gid = root

exclude = *.xml *.properties *.log

secrets file = /etc/rsyncd.pass

read only = no

EOF


2.

echo "root:123.com" > /etc/rsyncd.pass


3.

启动rsync命令: rsync --daemon --config=/etc/rsyncd.conf;

停止rsync命令:cat /var/run/rsyncd.pid | xargs kill -9 && rm -rf /var/run/rsyncd.pid


5.rsync -aPv /tmp/libselinux.so.1 /lib64



客户端

4..

[root@wlbkdb lib64]# echo "123.com" > /etc/rsyncd.pass

[root@wlbkdb lib64]# rsync -aPv /lib64/libselinux.so.1 serverIP::tmp



谢谢大神们的分享精神,让我找到了解决办法。在此拜谢。

误删除系统libselinux.SO.1,导致系统命令基本上都不能使用--附解决问题的整个过程

原文:http://6219306.blog.51cto.com/6209306/1733112

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!