[Case 40055] freshclam not found / ClamAV install runs out memory on 64-bit OS

madpato

Well-Known Member
May 30, 2008
51
1
58
Hello

I'm receiving from cpanel the following email:


/bin/sh: /usr/bin/freshclam: No such file or directory

then i logged in and make some searching:

ls -l /usr/bin
Nothing like freshclam is found.

And if i do:

# locate freshclam
/etc/freshclam.conf
/usr/local/bin/freshclam
Then:
ls -l /usr/local/bin
lrwxrwxrwx 1 root root 19 Sep 2 2009 freshclam -> ../../bin/freshclam
That is a symlink pointing to /usr/bin (which, has nothing like freshclam there)

I've tried unistalling and reinstalling clamav but i got the same issue.
Hope you guys can help me, thanks.
 

roba

Member
Jan 20, 2004
12
0
151
Prague, CZ
cPanel Access Level
Root Administrator
I have same problem on a fresh cPanel 11.25.0-R46156 CENTOS 5.5.

ClamAV was installed via WHM, but the freshclam command is missing and cron is complaining every night.

Any ideas please?
 

madpato

Well-Known Member
May 30, 2008
51
1
58
Wow, not even the cpanel staff answers this... and it seems it's not just me.
 

Zaf

Well-Known Member
Aug 22, 2005
117
0
166
Seeing this issue in newly setup boxes only, not on older boxes that are updated.
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
Houston, TX
cPanel Access Level
Root Administrator
I checked on a test server, and as you mentioned, /usr/local/bin/freshclam was a symlink to /usr/bin/freshclam:

Code:
$ which freshclam
/usr/local/bin/freshclam
$ ls -alh /usr/local/bin/freshclam 
lrwxrwxrwx 1 root root 19 Aug 12  2008 /usr/local/bin/freshclam -> ../../bin/freshclam*
$ ls -alh /usr/bin/freshclam 
-rwxr-xr-x 1 root root 248K May 28 22:19 /usr/bin/freshclam*
Since you said /usr/bin/freshclam does not exist, and reinstalling ClamAV using the Manage Plugins interface in the WebHost Manager did not fix it, please submit a ticket so that we may investigate the problem on your server directly.
 

argh2xxx

Member
Jan 2, 2008
6
0
51
Same problem for me

Please tell me how to fix this too! I have the same exact problem as the topic starter had!

Thanks!
 

Zaf

Well-Known Member
Aug 22, 2005
117
0
166
I checked on a test server, and as you mentioned, /usr/local/bin/freshclam was a symlink to /usr/bin/freshclam:
I tried this on one more box, but was unable to replicate. I think the difference might be 64 bit v/s 32 bit OS, since the box where it won't work is a 64 bit CentOS.

I will submit a ticket, if you want me to do so.
 

ManojB

Well-Known Member
Mar 25, 2005
80
0
156
pune
It seems that clamav installation is getting failed. Please check it if the zlib is installed properly. You can install this using the following steps :

wget http://zlib.net/zlib-1.2.5.tar.gz
tar -xvzf zlib-1.2.5.tar.gz
cd zlib-1.2.5
./configure
make
make install
After this is remove clamav from WHM also using the following steps :

/bin/rm -Rfv /usr/bin/clam*
/bin/rm -Rfv /usr/sbin/clam*
/bin/rm -Rfv /usr/lib/libclam*
/bin/rm -Rfv /usr/share/clam*
/bin/rm -Rfv /usr/include/clam*
/bin/rm -Rfv /usr/bin/freshclam*
/bin/rm -Rfv /usr/etc/clamav*
/bin/rm -Rfv /usr/local/bin/clam*
/bin/rm -Rfv /usr/local/sbin/clam*
/bin/rm -Rfv /usr/local/lib/libclam*
/bin/rm -Rfv /usr/local/share/clam*
/bin/rm -Rfv /usr/local/include/clam*
/bin/rm -Rfv /usr/local/bin/freshclam*
/bin/rm -Rfv /usr/local/etc/clamav*
And not install clamav via WHM ... hope this will solve your problem.
 

kosala

Registered
Aug 8, 2010
1
0
51
/bin/sh: /usr/bin/freshclam: No such file or directory

Hi,

I am receiving emails saying, /bin/sh: /usr/bin/freshclam: No such file or directory

I installed this via WHM. I would really appreciate if anyone could help me to fix this issue...

Thanks in advance.

K
 

Xisco

Member
May 1, 2004
10
0
151
The same problem here on a fresh intalled VPS three days ago: :(

CentOS 5.5 x86_64
cPanel 11.25.0-R46156
WHM 11.25.0
X 3.9
clamavconnector 0.96.1-2.4
 

santrix

Well-Known Member
Nov 30, 2008
223
2
68
Could someone from support confirm if this issue has been raised in an official support ticket or not, as I will submit a ticket if necessary.
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
Houston, TX
cPanel Access Level
Root Administrator
Check maxmem

Check the value of maxmem in /var/cpanel/cpanel.config:

Code:
# grep maxmem /var/cpanel/cpanel.config
maxmem=512
If this value is 256, it needs to be raised, and I recommend raising it to at least 512. If you edit the file directly, remember to run the following command afterward:

Code:
# /usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings
Note that editing /var/cpanel/cpanel.config and running the command above is the same as editing the value for The maximum memory a cPanel process can use before it is killed off (in megabytes) in Main >> Server Configuration >> Tweak Settings.

If the memory limit was 256 or less, and you raised it, try uninstalling and reinstalling ClamAV once more. There is a known issue that causes ClamAV to not install if the maxmem value is too low. A fix for this has been developed and is currently going through the QA process, but at this time there is no timeframe for when it will be released in public builds.
 

santrix

Well-Known Member
Nov 30, 2008
223
2
68
That was simple :) 512Mb works for me :)

As the old adage goes... you can never have enough!

Thanks Jared!
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
Houston, TX
cPanel Access Level
Root Administrator
There is an active internal case for unsetting the memory limit while installing plugins. There is no estimated timeframe for when it will be implemented, but our developers are aware of the problem this causes and are working to find the best solution.
 

morefood2001

Active Member
Mar 18, 2008
28
0
51
There is an active internal case for unsetting the memory limit while installing plugins. There is no estimated timeframe for when it will be implemented, but our developers are aware of the problem this causes and are working to find the best solution.
I can confirm that this is still a problem on a freshly installed server this morning. The workaround described worked fine. System: CentOS 5.5 x64 release branch.