首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从Debian 10更新到Debian 11出错

问从Debian 10更新到Debian 11出错
EN

Server Fault用户
提问于 2021-09-11 23:23:07
回答 1查看 972关注 0票数 0

我只是使用这些指示从Debian 10升级到Debian 11。一切似乎都进行得很顺利,除了麦迪特失败了。

这是一个错误:

代码语言:javascript
复制
maldet[2117]: maldet(2117): {mon} kernel does not support inotify(), aborting
systemd[1]: maldet.service: Can't open PID file /usr/local/maldetect/tmp/inotifywait.pid (yet?) after start: Operation not permitted 
systemd[1]: maldet.service: Failed with result 'protocol'.
systemd[1]: Failed to start Linux Malware Detect monitoring - maldet.

My /usr/lib/systemd/system/maldet.service文件包含:

代码语言:javascript
复制
[Unit]
Description=Linux Malware Detect monitoring - maldet
After=network.target

[Service]
EnvironmentFile=/usr/local/maldetect/conf.maldet
ExecStart=/usr/local/maldetect/maldet --monitor USERS
ExecStop=/usr/local/maldetect/maldet --kill-monitor
Type=forking
PIDFile=/usr/local/maldetect/tmp/inotifywait.pid
[Install]
WantedBy=multi-user.target

在更新之前,我验证了所有服务都正常工作,在更新过程中选择了"N“否,拒绝替换我的自定义配置文件.所以什么都不应该改变。

另外,我使用的是Linux5.10.0-8-AMD 64和maldet 1.6.4。

有人能帮我弄清楚吗?谢谢

EN

回答 1

Server Fault用户

回答已采纳

发布于 2021-09-27 09:18:12

问题是文件/usr/local/maldetect/internals/functions中的条件:

代码语言:javascript
复制
if [ -f "/boot/System.map-$(uname -r)" ]; then
        ksup=`grep -i inotify_ /boot/System.map-$(uname -r)`
        if [ -z "$ksup" ]; then
            eout "{mon} kernel does not support inotify(), aborting." 1
            exit
        fi
    elif [ -f "/boot/config-$(uname -r)" ]; then
        ksup=`grep -m1 CONFIG_INOTIFY /boot/config-$(uname -r)`
        if [ -z "$ksup" ]; then
            eout "{mon} kernel does not support inotify(), aborting." 1
            exit
        fi
fi

它正在对文件/boot/System.map-$(uname -r)执行grep,但是在Debian 11中,内容是ffffffffffffffff B The real System.map is in the linux-image--dbg package。

我看到了两个快速解决方案,第一个是检查适当的文件:

  • 使用以下命令apt install linux-image-$(uname -r)-dbg为正在运行的内核安装dbg包
  • 用sed -i 's#/boot/System.map#/lib/debug/boot/System.map#' /usr/local/maldetect/internals/functions替换条件的文件路径以指向好的条件

为了避免安装dbg包,另一种解决方案是删除第一个条件,而只使用签入/boot/config-$(uname -r)的第二个条件。

我用了第一个测试,现在开始了。这两种解决方案都应该在等待最终解决方案时起作用。

问候

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1077310

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档