unable to make backup link of `.

2021-10-24  本文已影响0人  WritingHere

在实验室服务器上执行upgrade时有遇到这个问题,参考了网上大佬的资料,发现问题在于chattr和lsattr需要被升级但是无法被删除(天呐我在说什么)
使用下面命令查看

lsattr /usr/bin/chattr

发现什么也没有输出,这代表什么?😇 切换root执行

sudo lsattr /usr/bin/chattr

依然没有输出,一脸懵逼。实在没有办法,模仿大佬将本地的chattr传到服务器上,命名为chattr_new,再用传上去的chattr_new更改chattr的属性

sudo ./chattr_new -i /usr/bin/chattr
sudo ./chattr_new -a /usr/bin/chattr

然后执行 sudo apt-get update && sudo apt-get upgrade ,没有任何问题,世界和平。

如果还有类似的报错,例如下面两条

unable to make backup link of `./usr/bin/chattr’ before installing new version: Operation not permitted
unable to make backup link of `./usr/sbin/sshd’ before installing new version: Operation not permitted

不要犹豫,如法炮制:

sudo ./chattr_new -i /usr/bin/lsattr
sudo ./chattr_new -a /usr/bin/lsattr
sudo ./chattr_new -i /usr/sbin/sshd
sudo ./chattr_new -a /usr/sbin/sshd
上一篇下一篇

猜你喜欢

热点阅读