freshclam
尝试以超级用户身份在 Ubuntu 18.04 上手动运行时出现以下错误(我已经按照其他问题所述停止了守护进程)。
# sudo freshclam
Wed May 22 07:33:08 2019 -> ClamAV update process started at Wed May 22 07:33:08 2019
Wed May 22 07:33:08 2019 -> ^Your ClamAV installation is OUTDATED!
Wed May 22 07:33:08 2019 -> ^Local version: 0.100.3 Recommended version: 0.101.2
Wed May 22 07:33:08 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Wed May 22 07:33:32 2019 -> getfile: Can't write 8192 bytes to /var/lib/clamav/clamav-61ad7aac1e8b42b507986f04c334427d.tmp/clamav-cba52511a773dacb076f4e204c4b1a77.tmp
Wed May 22 07:33:32 2019 -> ^Can't download main.cvd from db.local.clamav.net
Wed May 22 07:33:33 2019 -> *Can't query main.0.93.0.0.6810DA54.ping.clamav.net
但是手动创建文件是可行的,所以我不确定这是否是权限问题。
# mkdir /var/lib/clamav/clamav-63297260eb8cf259cb59552e4bddc3b3.tmp/
# dd if=/dev/urandom of=/var/lib/clamav/clamav-63297260eb8cf259cb59552e4bddc3b3.tmp/clamav-7802c73731c6f7f34959ac4d37b24f6e.tmp count=5840
5840+0 records in
5840+0 records out
2990080 bytes (3.0 MB, 2.9 MiB) copied, 0.0424701 s, 70.4 MB/s
我找到了以下两个来源:
但是他们的建议也无济于事(我没有配额,并且我尝试停止 AppArmor,但问题仍然存在。)
还有其他想法吗?我应该检查什么?
答案1
好的,我找到原因了:磁盘已满。
为了使答案完整,我在这里留下我的解决方案,如何使用卷扩展磁盘大小:
# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv 3.9G 3.7G 0 100% /
我们需要/dev/mapper/ubuntu--vg-ubuntu--lv
# lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
Size of logical volume ubuntu-vg/ubuntu-lv changed from 4.00 GiB (1024 extents) to <14.00 GiB (3583 extents).
Logical volume ubuntu-vg/ubuntu-lv successfully resized.
# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/mapper/ubuntu--vg-ubuntu--lv is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mapper/ubuntu--vg-ubuntu--lv is now 3668992 (4k) blocks long.
# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv 14G 3.7G 9.5G 28% /
# freshclam
Wed May 22 08:06:49 2019 -> ClamAV update process started at Wed May 22 08:06:49 2019
Wed May 22 08:06:49 2019 -> ^Your ClamAV installation is OUTDATED!
Wed May 22 08:06:49 2019 -> ^Local version: 0.100.3 Recommended version: 0.101.2
Wed May 22 08:06:49 2019 -> DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
Wed May 22 08:07:15 2019 -> Downloading main.cvd [100%]
Wed May 22 08:07:23 2019 -> main.cvd updated (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Wed May 22 08:07:24 2019 -> *Can't query main.58.93.1.0.6810DB54.ping.clamav.net
Wed May 22 08:07:32 2019 -> Downloading daily.cvd [100%]
Wed May 22 08:07:49 2019 -> daily.cvd updated (version: 25456, sigs: 1576656, f-level: 63, builder: raynman)
Wed May 22 08:07:49 2019 -> *Can't query daily.25456.93.1.0.6810DB54.ping.clamav.net
Wed May 22 08:07:49 2019 -> Downloading bytecode.cvd [100%]
Wed May 22 08:07:50 2019 -> bytecode.cvd updated (version: 328, sigs: 94, f-level: 63, builder: neo)
Wed May 22 08:07:50 2019 -> *Can't query bytecode.328.93.1.0.6810DB54.ping.clamav.net
Wed May 22 08:07:54 2019 -> Database updated (6142999 signatures) from db.local.clamav.net (IP: 104.16.219.84)
Wed May 22 08:07:54 2019 -> !NotifyClamd: Can't find or parse configuration file /etc/clamav/clamd.conf