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

现象:

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

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

此过程中借鉴大神:

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

方法如下

服务端

1.

cat > /etc/rsyncd.conf <

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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值