I have been trying to install clamav on Amazon Linux 2 using the following which works fine on Amazon Linux 1:

curl -O http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install epel-release-latest-7.noarch.rpm

sudo yum install clamav clamd -y

sudo sed -i -e "s/Example/#Example/" /etc/freshclam.conf
sudo sed -i -e "s:#DatabaseDirectory /var/lib/clamav:DatabaseDirectory /var/lib/clamav:" /etc/freshclam.conf
sudo sed -i -e "s:#UpdateLogFile /var/log/freshclam.log:UpdateLogFile /var/log/freshclam.log:" /etc/freshclam.conf
sudo sed -i -e "s/#DatabaseOwner clamupdate/DatabaseOwner clamupdate/" /etc/freshclam.conf

sudo freshclam

Running the last command

ClamAV update process started at Thu Mar 26 12:10:45 2020
daily database available for download (remote version: 25762)
Time: 1.5s, ETA: 0.0s [=============================>] 57.64MiB/57.64MiB        
Testing database: '/var/lib/clamav/tmp.97d56/clamav-4e4a470c3011072ab79e022e287a1609.tmp-daily.cvd' ...
ERROR: Database load killed by signal 9
ERROR: Database test FAILED.
ERROR: Unexpected error when attempting to update database: daily
WARNING: fc_update_databases: fc_update_database failed: Test failed (8)
ERROR: Database update process failed: Test failed (8)
ERROR: Update failed.

I assume that the package isn't compatible with AL2 but has anyone had any success installing it?

  • How much memory does your instance have?
    – Bert
    Mar 26 '20 at 12:22
ERROR: Database load killed by signal 9

That means you are running out of system memory. Add more memory or create a larger instance and this issue will go away. Clamav uses a fairly large amount of memory.

  • You are absolutely right, thanks!
    – williamsdb
    Mar 26 '20 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.