centos执行sudo yum install glibc-headers -y报错信息如下:

Downloading packages:
glibc-headers-2.17-326.el7_9.3.x86_64.rpm                                                                                            | 692 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : glibc-headers-2.17-326.el7_9.3.x86_64                                                                                                   1/1
Error unpacking rpm package glibc-headers-2.17-326.el7_9.3.x86_64
error: unpacking of archive failed on file /usr/include/lastlog.h: cpio: rename
  验证中      : glibc-headers-2.17-326.el7_9.3.x86_64                                                                                                   1/1

失败:
  glibc-headers.x86_64 0:2.17-326.el7_9.3

完毕!

sudo lsof /usr/include/lastlog.h
sudo kill -9 $(sudo lsof -t /usr/include/lastlog.h)
sudo cp -f /usr/include/lastlog.h /tmp/lastlog.h.bak
sudo chown root:root /usr/include
sudo chmod 0755 /usr/include
sudo restorecon -R -v /usr/include
sudo yumdownloader glibc-headers

安装成功!

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐