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?