在linux 不小心卸载了这个包 audit-libs-2.8.5-4.el7.x86_64 导致rpm , yum 命令用不了 怎么把这个包装回去啊,能不能提供一下源码包
看看audit进程是否还在。
试试把audit停了,看看yum是否能用。
systemctl stop auditd.service 若过错误,kill /sbin/auditd进程。
[root@dem ~]# ps -ef|grep audit
root 22 2 0 11:11 ? 00:00:00 [kauditd]
root 828 1 0 11:12 ? 00:00:00 /sbin/auditd
root 2017 1949 0 11:16 pts/0 00:00:00 grep audit
[root@dem ~]# systemctl |grep audit
auditd.service loaded active running Security Auditing Service
systemd-journald-audit.socket loaded active running Journal Audit Socket
[root@dem ~]# systemctl stop auditd.service
[root@dem ~]# ps -ef|grep audit
root 22 2 0 11:11 ? 00:00:00 [kauditd]
root 2026 1949 0 11:17 pts/0 00:00:00 grep audit
[root@dem ~]# mount /dev/sr0 /mnt
mount: /mnt: WARNING: source write-protected, mounted read-only.
[root@dem ~]# yum search audit
Last metadata expiration check: 15 days, 16:04:21 ago on Mon 14 Nov 2022 07:13:45 PM CST.
================================================================== Name & Summary Matched: audit ==================================================================
audit.x86_64 : User space tools for kernel auditing
audit-devel.x86_64 : Header files for libaudit
audit-help.noarch : Documents for audit
audit-libs.x86_64 : Dynamic library for libaudit
python2-audit.x86_64 : Python2 bindings for libaudit
python3-audit.x86_64 : Python3 bindings for libaudit
https://centos.pkgs.org/7/centos-x86_64/audit-libs-2.8.5-4.el7.x86_64.rpm.html
包的话,随便去国内源的地址,找一个OK了。然后rpm -ivh 重新安装上去就好,
例如,以阿里云为例子:
https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/