![ClamAV,无法更新数据库,调试时出现“cli_cvdverify:MD5 验证错误”](https://linux22.com/image/926236/ClamAV%EF%BC%8C%E6%97%A0%E6%B3%95%E6%9B%B4%E6%96%B0%E6%95%B0%E6%8D%AE%E5%BA%93%EF%BC%8C%E8%B0%83%E8%AF%95%E6%97%B6%E5%87%BA%E7%8E%B0%E2%80%9Ccli_cvdverify%EF%BC%9AMD5%20%E9%AA%8C%E8%AF%81%E9%94%99%E8%AF%AF%E2%80%9D.png)
我有两个关于 Ubuntu 18.04 的 ClamAV 的问题。
笔记:我最初将这个问题发布在:https://answers.launchpad.net/ubuntu/+source/clamav/+question/691247
1)尝试更新数据库时,它会引发错误:
$ freshclam
ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
2)如果手动更新,
$ sudo systemctl stop clamav-freshclam
$ sudo freshclam -v --debug
我收到:“LibClamAV 调试:cli_cvdverify:MD5 验证错误”
Wed Jun 10 03:18:21 2020 -> ClamAV update process started at Wed Jun 10 03:18:21 2020
Wed Jun 10 03:18:21 2020 -> *Current working dir is /var/lib/clamav/
Wed Jun 10 03:18:21 2020 -> *Querying current.cvd.clamav.net
Wed Jun 10 03:18:21 2020 -> *TTL: 49
Wed Jun 10 03:18:21 2020 -> *fc_dns_query_update_info: Software version from DNS: 0.102.3
Wed Jun 10 03:18:21 2020 -> *Current working dir is /var/lib/clamav/
Wed Jun 10 03:18:21 2020 -> *check_for_new_database_version: No local copy of "daily" database.
Wed Jun 10 03:18:21 2020 -> *query_remote_database_version: daily.cvd version from DNS: 25838
Wed Jun 10 03:18:21 2020 -> daily database available for download (remote version: 25838)
Wed Jun 10 03:18:21 2020 -> *Retrieving https://database.clamav.net/daily.cvd
Wed Jun 10 03:18:21 2020 -> *downloadFile: Download source: https://database.clamav.net/daily.cvd
Wed Jun 10 03:18:21 2020 -> *downloadFile: Download destination: /var/lib/clamav/tmp.8992e/clamav-ec18132f673c1d2a6bbeb5ec44d0ddce.tmp
* Trying 104.16.218.84...
* TCP_NODELAY set
* Connected to database.clamav.net (104.16.218.84) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
* start date: Apr 6 00:00:00 2020 GMT
* expire date: Oct 9 12:00:00 2020 GMT
* subjectAltName: host "database.clamav.net" matched cert's "database.clamav.net"
* issuer: C=US; ST=CA; L=San Francisco; O=CloudFlare, Inc.; CN=CloudFlare Inc ECC CA-2
* SSL certificate verify ok.
> GET /daily.cvd HTTP/1.1
Host: database.clamav.net
User-Agent: ClamAV/0.102.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Accept: */*
Connection: close
< HTTP/1.1 200 OK
< Date: Wed, 10 Jun 2020 09:18:21 GMT
< Content-Type: application/octet-stream
< Content-Length: 69709942
< Connection: close
< Set-Cookie: __cfduid=ddec765464d79c5d357514b14980f905f1591780701; expires=Fri, 10-Jul-20 09:18:21 GMT; path=/; domain=.clamav.net; HttpOnly; SameSite=Lax
< Last-Modified: Tue, 09 Jun 2020 12:50:00 GMT
< ETag: "5edf8578-427b076"
< Expires: Wed, 10 Jun 2020 13:18:21 GMT
< Cache-Control: public, max-age=14400
< CF-Cache-Status: HIT
< Age: 11407
< Accept-Ranges: bytes
< cf-request-id: 033f1f0d3b000011a51a284200000001
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< Strict-Transport-Security: max-age=15552000
< X-Content-Type-Options: nosniff
< Server: cloudflare
< CF-RAY: 5a12012858e611a5-MIA
<
Time: 10.1s, ETA: 0.0s [=============================>] 66.48MiB/66.48MiB
* Closing connection 0
LibClamAV debug: Initialized 0.102.3 engine
LibClamAV debug: in cli_cvdload()
LibClamAV debug: MD5(.tar.gz) = 2262f0af8e8aa108fa762edb971de51c
LibClamAV debug: cli_cvdverify: MD5 verification error
LibClamAV debug: Cleaning up phishcheck
LibClamAV debug: Phishcheck cleaned up
Wed Jun 10 03:18:31 2020 -> !getcvd: Verification: Can't verify database integrity
Wed Jun 10 03:18:31 2020 -> Trying again in 5 secs...
Wed Jun 10 03:18:36 2020 -> *check_for_new_database_version: No local copy of "daily" database.
Wed Jun 10 03:18:36 2020 -> *query_remote_database_version: daily.cvd version from DNS: 25838
Wed Jun 10 03:18:36 2020 -> daily database available for download (remote version: 25838)
Wed Jun 10 03:18:36 2020 -> *Retrieving https://database.clamav.net/daily.cvd
Wed Jun 10 03:18:36 2020 -> *downloadFile: Download source: https://database.clamav.net/daily.cvd
Wed Jun 10 03:18:36 2020 -> *downloadFile: Download destination: /var/lib/clamav/tmp.8992e/clamav-ac9d70def64f50de9067f084f60e2eec.tmp
* Trying 104.16.218.84...
* Trying 104.16.218.84...
* TCP_NODELAY set
* Connected to database.clamav.net (104.16.218.84) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=CA; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
* start date: Apr 6 00:00:00 2020 GMT
* expire date: Oct 9 12:00:00 2020 GMT
* subjectAltName: host "database.clamav.net" matched cert's "database.clamav.net"
* issuer: C=US; ST=CA; L=San Francisco; O=CloudFlare, Inc.; CN=CloudFlare Inc ECC CA-2
* SSL certificate verify ok.
> GET /daily.cvd HTTP/1.1
Host: database.clamav.net
User-Agent: ClamAV/0.102.3 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Accept: */*
Connection: close
< HTTP/1.1 200 OK
< Date: Wed, 10 Jun 2020 09:20:34 GMT
< Content-Type: application/octet-stream
< Content-Length: 69709942
< Connection: close
< Set-Cookie: __cfduid=df95e600bf2a98f926903249460d7f8431591780834; expires=Fri, 10-Jul-20 09:20:34 GMT; path=/; domain=.clamav.net; HttpOnly; SameSite=Lax
< Last-Modified: Tue, 09 Jun 2020 12:50:00 GMT
< ETag: "5edf8578-427b076"
< Expires: Wed, 10 Jun 2020 13:20:34 GMT
< Cache-Control: public, max-age=14400
< CF-Cache-Status: HIT
< Age: 11540
< Accept-Ranges: bytes
< cf-request-id: 033f2116770000c88f880a6200000001
< Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< Strict-Transport-Security: max-age=15552000
< X-Content-Type-Options: nosniff
< Server: cloudflare
< CF-RAY: 5a12046a5931c88f-MIA
<
Time: 10.8s, ETA: 0.0s [=============================>] 66.48MiB/66.48MiB
* Closing connection 0
LibClamAV debug: Initialized 0.102.3 engine
LibClamAV debug: in cli_cvdload()
LibClamAV debug: MD5(.tar.gz) = cd177dacb5343e60e3f8c3240dbf8175
LibClamAV debug: cli_cvdverify: MD5 verification error
LibClamAV debug: Cleaning up phishcheck
LibClamAV debug: Phishcheck cleaned up
Wed Jun 10 03:20:45 2020 -> !getcvd: Verification: Can't verify database integrity
Wed Jun 10 03:20:45 2020 -> Giving up on https://database.clamav.net...
Wed Jun 10 03:20:45 2020 -> !Update failed for database: daily
Wed Jun 10 03:20:45 2020 -> ^fc_update_databases: fc_update_database failed: Invalid or corrupted CVD/CLD database (7)
Wed Jun 10 03:20:45 2020 -> !Database update process failed: Invalid or corrupted CVD/CLD database (7)
Wed Jun 10 03:20:45 2020 -> !Update failed.
这是 Ubuntu 18.04 发行版。
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
$ uname -r
5.3.0-53-generic
$ freshclam --version
ClamAV 0.102.3
请帮忙。