现象:

 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



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