在 Ubuntu 20.4 上安装 ClamAV

在 Ubuntu 20.4 上安装 ClamAV

我想安装clamav。我遵循社区文档通过做

$ sudo apt-get install clamav

使用 确认后y,安装过程结束时会发生以下情况:

Selecting previously unselected package clamav.
Preparing to unpack .../clamav_0.102.4+dfsg-0ubuntu0.20.04.1_amd64.deb ...
Unpacking clamav (0.102.4+dfsg-0ubuntu0.20.04.1) ...
Setting up libtfm1:amd64 (0.13-4) ...
Setting up libclamav9:amd64 (0.102.4+dfsg-0ubuntu0.20.04.1) ...
Setting up linux-image-5.4.0-45-generic (5.4.0-45.49) ...
Setting up clamav-base (0.102.4+dfsg-0ubuntu0.20.04.1) ...
id: ‘clamav’: no such user
Setting up clamav-freshclam (0.102.4+dfsg-0ubuntu0.20.04.1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/clamav-freshclam.service → /lib/systemd/system/clamav-freshclam.service.
Setting up clamav (0.102.4+dfsg-0ubuntu0.20.04.1) ...
Processing triggers for systemd (245.4-4ubuntu3.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
Processing triggers for linux-image-5.4.0-45-generic (5.4.0-45.49) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-45-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 12: /etc/default/grub: snd_hda_intel.dmic_detect=0: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.4.0-45-generic (--configure):
 installed linux-image-5.4.0-45-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-5.4.0-45-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

发生了什么事?clamavUbuntu 20.4 不再维护了吗?

答案1

正如其中一条评论所暗示的那样,这原来是我的系统上 grub 的默认设置方式存在问题。运行:

sudo nano /etc/default/grub

就我的情况来说,那里写了以下内容:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
snd_hda_intel.dmic_detect=0

将该行放置dmic_detect在该linux_default行内:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd_hda_intel.dmic_detect=0"
GRUB_CMDLINE_LINUX=""

保存并运行

sudo grub-mkconfig -o /boot/grub/grub.cfg

此后,安装就没有任何问题。

GRUB_CMDLINE_LINUX_DEFAULT="日志级别=3 snd_hda_intel.dmic_detect=0"

相关内容