Bobcares

freshclam command not found – A Quick solution

by | Mar 9, 2020

Are you stuck with the error “freshclam command not found”? We can help you fix it.

Usually, this error occurs when we try to update the virus databases in antivirus tools like ClamAV.

At Bobcares, we often receive requests to resolve ClamAV errors as part of our Server Management Services.

Today, let’s discuss how our Support Engineers easily fix this error for our customers.

 

More about ClamAV

As we all know, malware can cause serious impacts on website content. It directly affects the data security.

So, as a security measure, most server owners install antivirus programs like Clamav. Here, we check the downloaded files for virus signatures.

Usually, we use ClamAV to scan the downloaded files, emails, pdf, etc for virus detection.

Hackers evolve new methods of hacking every day. That’s why after the installation of ClamAV, the primary thing that we do is updating the virus database. But, while updating, this often throws certain errors.

 

How we fixed the error freshclam command not found?

Usually, the freshclam is a virus database update tool in ClamAV. Let us now see how our Support Engineers resolve the freshclam errors easily.

Recently, one of our customers approached us with a freshclam error. He installed ClamAV through WHM in his cPanel Centos Server. Then, he tried to update virus databases using the below command,

freshclam

But, on executing the command, he received the below error.

freshclam command not found

 

Our Support Engineers checked the error in detail. On checking, we found that the symbolic links were not set properly.

In some cases, the newer versions of ClamAV do not create symbolic links as standard during its initial installation.

If we need to use the command-line interface to run ClamAV, the below binaries should reside in the /usr/local/cpanel/3rdparty/bin/ directory.

/usr/local/cpanel/3rdparty/bin/clamscan
/usr/local/cpanel/3rdparty/bin/clamdscan
/usr/local/cpanel/3rdparty/bin/freshclam

And, these binaries should have a symlink with the /usr/local/bin directory. So, the absence of this symlink caused the error.

Therefore, to resolve the error, we set the symlinks as follows.

ln -s /usr/local/cpanel/3rdparty/bin/clamscan /usr/local/bin/clamscan
ln -s /usr/local/cpanel/3rdparty/bin/freshclam /usr/local/bin/freshclam

This resolved the error easily.

Similarly, not accessing the binary with full path may also result in this error. In general, the $PATH variable will give the full path.

If it is empty or does not contain the full path, we need to set the path variable as below.

export PATH="full_path_of_binary"

 

[Need more assistance to resolve Clamav errors?- We’re available 24/7 to help you.]

 

Conclusion

In short, the freshclam command not found error occurs mainly due to incorrect setting of symlinks. In today’s writeup, we discussed how our Support Engineers fix this error easily.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

1 Comment

  1. Tufan

    There is no sample of this document on the internet …..you are amazing

    ty so much

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.