LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-20-2012, 06:26 PM   #1
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Rep: Reputation: 9
Thumbs down Unable to run clamav


hello friends,

I am running rhel6, i downloaded the clamav latest source from their site, compiled and installed it. However when i try to run it it starts throwing weird kinds of errors and i am having really hard time at solving the errors.

Code:
clamav/sbin/clamd 
LibClamAV Error: cl_load(): Can't get status of /home/rohit/clamav/share/clamav
ERROR: Can't get file status

 clamav/bin/freshclam 
ERROR: Can't change dir to /home/rohit/clamav/share/clamav

after i create clamav directory in /home/rohit/clamav/share

ll clamav/share/
total 8
drwxr-xr-x. 2 rohit rohit 4096 Jul 20 19:23 clamav
drwxrwxr-x. 5 rohit rohit 4096 Jul 20 18:54 man


clamav/sbin/clamd 
LibClamAV Error: cli_loaddb(): No supported database files found in /home/rohit/clamav/share/clamav
ERROR: Can't open file or directory
 
 After i copy the database files from source
 
$clamav/sbin/clamd 
LibClamAV Error: cli_cvdverify: Can't read CVD header
LibClamAV Error: Can't load /home/rohit/clamav/share/clamav/daily.cvd: Broken or not a CVD file
ERROR: Broken or not a CVD file
So can anyone let me know how do i go ahead in fixing the above errors.
 
Old 07-21-2012, 02:43 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Rohit_4739 View Post
I am running rhel6, i downloaded the clamav latest source from their site (..) can anyone let me know how do i go ahead in fixing the above errors.
You shouldn't have installed ClamAV from source, RPM packages are how you install software in RHEL, and you shouldn't have installed it in your personal account. There's no obvious reason as the ClamAV site lists Repoforge (http://pkgs.repoforge.org/clamav/) as the place to get .el6 packages and your unprivileged user account might not have the required rights to run clamd the way it should. So run 'make uninstall' if the source tree is still available and supports that, or delete the installed items, and install the required packages, configure them and run freshclam to update the signature file.
 
Old 07-21-2012, 04:37 AM   #3
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by unSpawn View Post
You shouldn't have installed ClamAV from source, RPM packages are how you install software in RHEL, and you shouldn't have installed it in your personal account. There's no obvious reason as the ClamAV site lists Repoforge (http://pkgs.repoforge.org/clamav/) as the place to get .el6 packages and your unprivileged user account might not have the required rights to run clamd the way it should. So run 'make uninstall' if the source tree is still available and supports that, or delete the installed items, and install the required packages, configure them and run freshclam to update the signature file.
hi,

i was just testing by installing it in my personal account. I tried installing as root also but again also didn't worked. Just being curious, any particular reason for not installing ClamAv from source ?
 
Old 07-21-2012, 04:54 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
seeing as you built it instead of using yum
Code:
su -
yum install calmav
there ARE MANY THINGS YOU MUST DO FIRST

for the source build YOU MUST
1) make a user account called "clamav" all lowercase and WITHOUT a home folder
2) add a clamav group TO that clamav user and add the "users" group TO clamav account
3) install clam
4) edit the two files clamd.conf and freshclam.conf

then
5) run freshclam !!!
then ON the build folder run clam on it!!
there ARE something like 12 TESTING viruses in the source file
not real ones BUT clam will detect them AS real
 
Old 07-21-2012, 05:09 AM   #5
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by John VV View Post
seeing as you built it instead of using yum
Code:
su -
yum install calmav
there ARE MANY THINGS YOU MUST DO FIRST

for the source build YOU MUST
1) make a user account called "clamav" all lowercase and WITHOUT a home folder
2) add a clamav group TO that clamav user and add the "users" group TO clamav account
3) install clam
4) edit the two files clamd.conf and freshclam.conf

then
5) run freshclam !!!
then ON the build folder run clam on it!!
there ARE something like 12 TESTING viruses in the source file
not real ones BUT clam will detect them AS real

Hi John,

I followed the steps exactly as you mentioned, but it is giving all those errors which i mentioned in my original post
 
Old 07-21-2012, 05:21 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Rohit_4739 View Post
i was just testing by installing it in my personal account.
Sure you're free to do so but it simply is not a best practice. If you need certain software then you go find it, read up on it, install it using your platforms package management, configure it and then test it. If you work with machines that allow for no fsckups you would install and test software on a staging machine or in a virtualization guest to ensure everything works before you move things to production.


Quote:
Originally Posted by Rohit_4739 View Post
I tried installing as root also but again also didn't worked.
Listing your distribution as "Red Hat" in your user profile and posting from a Windows 7 machine you may be kind of new to Linux (or not) but as far as I'm concerned "didn't worked" is not showing proper troubleshooting technique. Watching stdout, log file contents, increasing verbosity or running an application in debug mode and posting exact output would be a start.


Quote:
Originally Posted by Rohit_4739 View Post
Just being curious, any particular reason for not installing ClamAv from source ?
Your distributions package management allows you to easily choose software from different repos, ensures you get the latest release for your platform, verifies package integrity, resolves dependencies as much as possible and manages packages in a way that is consistent with your distribution and release. Installing software from source makes you responsible for everything. (To see how that can affect unsuspecting users of a certain other distribution see for example this thread.) That is not meant as discouragement, sometimes software just isn't packaged for RHEL and derivatives yet, but unless there are valid and compelling reasons to do so I suggest you avoid mixing installation methods. If you made certain no package exists you can also opt for building your own and that often isn't as hard as it looks.
 
Old 07-21-2012, 05:41 AM   #7
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Quote:
Listing your distribution as "Red Hat" in your user profile and posting from a Windows 7 machine you may be kind of new to Linux (or not) but as far as I'm concerned "didn't worked" is not showing proper troubleshooting technique. Watching stdout, log file contents, increasing verbosity or running an application in debug mode and posting exact output would be a start.
I am running rhel as VM guest on a windows 7 host. Yeah i did checked the stdout and i posted the exactly what i was doing and what errors i was getting in my original post. So if you could please take a look and let me know how can i fix it. I will also try using rpm but if you could help me with this first, it would be a addition to my knowledge..

Last edited by Rohit_4739; 07-21-2012 at 05:46 AM.
 
Old 07-21-2012, 05:54 AM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
for red hat your FIRST stop should be the red hat knowlage base
the answers to almost ALL every day things ARE in there
you HAD to buy a red hat license for RHEL6
then take advantage of that support you ARE paying $299 per year for

https://access.redhat.com/knowledge/search
login to the red hat web site
and search for "clammav"
or
fallow the instructions ON the clam web site
install the third party repo
http://www.clamav.net/lang/en/downlo...ackages-linux/
the instructions ARE under the fedora/red hat
see the FAQ
http://dag.wieers.com/rpm/FAQ.php#B1
then use yum



the source has many DIFFERENT ways to build it
and a mess of manually making BY HAND config files for things like the mail "mitter"
or the background daemon

those things would have to be manually made from scratch


now if all you want is clam av
AND NOT the background daemon
then do not call "clamd "

only call the on demand
clamscan


there is a reason for "yum" please use it
 
Old 07-21-2012, 06:15 AM   #9
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by John VV View Post
for red hat your FIRST stop should be the red hat knowlage base
the answers to almost ALL every day things ARE in there
you HAD to buy a red hat license for RHEL6
then take advantage of that support you ARE paying $299 per year for

https://access.redhat.com/knowledge/search
login to the red hat web site
and search for "clammav"
or
fallow the instructions ON the clam web site
install the third party repo
http://www.clamav.net/lang/en/downlo...ackages-linux/
the instructions ARE under the fedora/red hat
see the FAQ
http://dag.wieers.com/rpm/FAQ.php#B1
then use yum



the source has many DIFFERENT ways to build it
and a mess of manually making BY HAND config files for things like the mail "mitter"
or the background daemon

those things would have to be manually made from scratch


now if all you want is clam av
AND NOT the background daemon
then do not call "clamd "

only call the on demand
clamscan


there is a reason for "yum" please use it
I just checked on dag.wieers.com, but i guess the rpmforge repo does not support el6 yet as i did not find any rpmforge-release package for rhel6
 
Old 07-21-2012, 08:59 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by John VV View Post
(..) red hat (..) knowlage base (..) "clammav" (..) fallow (..) "mitter"
May I suggest you use the spelling checker? ;-p


Quote:
Originally Posted by Rohit_4739 View Post
I just checked on dag.wieers.com, but i guess the rpmforge repo does not support el6 yet as i did not find any rpmforge-release package for rhel6
There's no need to "guess": you just lack the rudimentary skills to find it ;-p See http://pkgs.repoforge.org/rpmforge-release/.


Quote:
Originally Posted by Rohit_4739 View Post
I will also try using rpm but if you could help me with this first, it would be a addition to my knowledge..
As unprivileged user extract the tarball contents and run '/configure --help' to see if you need to disable or enable any specific options (and don't fsck with switches like "--prefix" and setting it to "/home/rohit/clamav", that's not FSSTND / LFS / whatever else standards-compliant, but leave it or ensure it uses system default). Then run './configure; make' and observe the build process exits OK. Then run 'sudo make -n install' (or su to root and run 'make -n install' the unprivileged users directory you compiled ClamAV in) to see where the installation places files without actually installing it. If OK then run the same but without "-n". After that you'll have to assess if the default configuration files are OK for your system (indeed: clam user account) and update the signature database. Then running clamd or clamscan should work w/o throwing errors. If it does then see if explicitly enabling options in the configuration file (or on the command line) for --database, --tempdir, etc, etc makes errors go away.

Do you see now why using official or 3rd party packages is less error-prone, more secure, more convenient and way more efficient?
 
Old 07-21-2012, 09:13 AM   #11
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Quote:
There's no need to "guess": you just lack the rudimentary skills to find it ;-p See http://pkgs.repoforge.org/rpmforge-release/.
I think being a senior member of the forum you shouldn't be posting comments like this. I have seen quite a number of senior members here who keep suggesting million things to new members but infact they themselves lack some BASIC manners and communication skills. Knowing something doesn't makes one a born genius or a prodigy child, everyone starts from scratch; so if you think someone is making some basic mistakes you should tell them same in a proper way not in a taunting way.




Looks like nobody answer to fix the errors i posted in my OP, anyways i will try some other ways. thanks all for taking your time to reply and help me.
 
Old 07-21-2012, 07:40 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Rohit_4739

what happens when you do this
Code:
su -
cd /TheLocation/Of/Your/Clam/Build/Folder
freshclam
clamscan -help
--- then this -----
clamscan -ri
the output should be the testing viruses IN the clam build folder
 
Old 07-23-2012, 05:19 AM   #13
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Quote:
Originally Posted by Rohit_4739 View Post
I think being a senior member of the forum you shouldn't be posting comments like this. I have seen quite a number of senior members here who keep suggesting million things to new members but infact they themselves lack some BASIC manners and communication skills. Knowing something doesn't makes one a born genius or a prodigy child, everyone starts from scratch; so if you think someone is making some basic mistakes you should tell them same in a proper way not in a taunting way.
I see no insult in unSpawn's post. It is stating a fact in a straight-forward manner. Pointing out that you
Quote:
just lack the rudimentary skills to find it
is not an insult. It is simply pointing out that you do not yet have the required knowledge to accomplish the task you set for yourself. Not including a happy-face icon does not make it an insult. It was meant as helpful advice. Did you not also notice the long explanation of what to do that followed the comment? If unSpawn was belittling you, it is unlikely he would have typed up that very informative post for you.

So relax, and take the observation in the spirit it was intended.
 
Old 07-23-2012, 08:09 AM   #14
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,667
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
Ladies... Gentlemen...

I'm just as puzzled as the OP is about what the OP reported, and I frankly don't think that any respondent so far has the actual answer being sought. So, let's just all wait until somebody does, and not point unfriendly fingers at one another in public places... This is "getting nowhere." Therefore, since the purpose of any post is to "get somewhere," let's just muzzle this diversion.

The first part of the OP's problem sounds like a permissions issue. The second, I truly don't know: maybe a "hexdump" of the file's format (after checking that it does exist) would provide a few clues.

Unfortunately, it may well be that a software product is such that it can only be installed in "the one right way." I suggest that maybe a more fruitful source of answers would be their support forums. Once you find the answer, please summarize it here.
 
Old 07-23-2012, 08:54 AM   #15
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
The thread may be going nowhere, but it is not getting out-of-hand. Only one unfriendly finger has been pointed. That one by the OP, who misinterpreted one of unSpawn's comments, and my post was an explanation of that. And since the latest advice is a repeat of John VV's suggestion in post #8, then the thread must still be going nowhere?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] run clamav on mount of flashdrive schuurs Linux - Security 5 03-29-2010 07:33 AM
When I run clamav, it just waits, no message (even with -v ), avsan hangs loading db lumix Linux - Software 1 05-13-2008 11:17 PM
How to run ClamAV ? TigerLinux SUSE / openSUSE 6 11-08-2005 11:45 AM
Can't connect to UNIX socket /var/run/clamav/clamd shitoryu Linux - Software 1 07-25-2005 12:52 AM
Run email script from clamav Pete M Programming 0 07-25-2004 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration