Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-29-2009, 05:05 AM
|
#1
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep: 
|
Problems compiling pyclamav.
Hello all,
I am trying to install clam av and then get it integrate it with squid. One way is to install dansguardian-av. But this is built on old dans version. So the other option that I have is to install pyclamav and SCAVR ( squid clam av redirector ) and use.
Downloaded pyclamav and extracted it and now trying to compile it.
Running this command
python setup.py build and getting the error:
Code:
running build
running build_ext
building 'pyclamav' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -I/usr/local/include -I/usr/include/python2.4 -c pyclamav.c -o build/temp.linux-i686-2.4/pyclamav.o
pyclamav.c: In function ‘if_database_have_changed_then_reload’:
pyclamav.c:89: warning: implicit declaration of function ‘cl_free’
pyclamav.c:94: warning: passing argument 2 of ‘cl_load’ from incompatible pointer type
pyclamav.c:101: warning: implicit declaration of function ‘cl_build’
pyclamav.c: In function ‘pyclamav_scanfile’:
pyclamav.c:234: warning: passing argument 4 of ‘cl_scanfile’ from incompatible pointer type
pyclamav.c:234: warning: passing argument 5 of ‘cl_scanfile’ makes integer from pointer without a cast
pyclamav.c:234: error: too many arguments to function ‘cl_scanfile’
pyclamav.c: In function ‘initpyclamav’:
pyclamav.c:282: warning: passing argument 2 of ‘cl_load’ from incompatible pointer type
pyclamav.c:305: error: invalid application of ‘sizeof’ to incomplete type ‘struct cl_limits’
pyclamav.c:305: error: invalid application of ‘sizeof’ to incomplete type ‘struct cl_limits’
pyclamav.c:305: error: invalid application of ‘sizeof’ to incomplete type ‘struct cl_limits’
pyclamav.c:305: error: invalid application of ‘sizeof’ to incomplete type ‘struct cl_limits’
pyclamav.c:305: error: invalid application of ‘sizeof’ to incomplete type ‘struct cl_limits’
pyclamav.c:306: error: invalid use of undefined type ‘struct cl_limits’
pyclamav.c:307: error: invalid use of undefined type ‘struct cl_limits’
pyclamav.c:308: error: invalid use of undefined type ‘struct cl_limits’
pyclamav.c:309: error: invalid use of undefined type ‘struct cl_limits’
error: command 'gcc' failed with exit status 1
Any ideas?
|
|
|
12-29-2009, 04:51 PM
|
#2
|
LQ Newbie
Registered: Dec 2009
Location: Venezuela
Distribution: Slackware 13, Gentoo 2.6.34, Ubuntu 11.04
Posts: 10
Rep:
|
Did you check that the setup.py script
I once installed Clamav on a Ubuntu 7.10 directly from Synaptic, kubuntu must have it in their repositories.
I see that you are using a pyton script.
Did you check that the setup.py script is using the correct path for your system? also, do you change the permissions of the script?
|
|
|
12-29-2009, 08:57 PM
|
#3
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
http://xael.org/norman/python/pyclamav/
QUOTE : "Due to removal of cl_scanbuff in libclamav, pyclamav.scanthis()
has to be removed. You are now strongly encouraged to use pyClamd ! "
pyClamd → http://xael.org/norman/python/pyclamd/
> > pyclamd.py
http://xael.org/norman/python/pyclamd/pyclamd.py
.. I have no idea how well it works .. just referring the text ..
..... ..
But then again, pyclamd is in the repo : python-pyclamd
.....
Last edited by knudfl; 12-29-2009 at 09:01 PM.
|
|
|
12-29-2009, 10:33 PM
|
#4
|
Senior Member
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,573
|
Yeah, there is a package for it: python-clamav.
|
|
|
12-29-2009, 11:02 PM
|
#5
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Original Poster
Rep: 
|
Sorry guys. I am not using Ubuntu for my squid purposes. This is just my desktop. Server is running CentOS5.4 Final.
@knudfl: Will give that a try.
|
|
|
12-30-2009, 12:50 AM
|
#6
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Original Poster
Rep: 
|
Downloaded the pyclamd and copied as said. I am using with squid clam av redirector program which is also written in python.
have changed SquidClamAVRedirector.py to reflect the changes for the use of pyclamd instead of pyclamav.
I am running it as
/usr/local/bin/SquidClamAVReidrector.py -c /etc/squid/SquidClamAVRedirector.conf to test. I just need to know if it should end or not or should it give some output.
For me it is just there and cursor is blinking forever. And I have to end it with Ctrl+D.
Is it what I need to do?
|
|
|
12-30-2009, 04:21 AM
|
#7
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Arh .. you are just trying to put us on the wrong track ?
OK then, CentOS 54 it is ..
Please use the "mark_alfred" link .. post # 4
http://packages.ubuntu.com/karmic/python-clamav
> > " Links for python-clamav "
> python-clamav_0.4.1.orig.tar.gz],
[clamav_0.4.1-1ubuntu2.diff.gz]
cd pyclamav-0.4.1/
patch -p1 < python-clamav_0.4.1-1ubuntu2.diff
python setup.py build
.. provides : build/lib.linux-i686-2.4/pyclamav.so
.....
..... ..  ..
.....
|
|
|
12-30-2009, 05:12 AM
|
#8
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Original Poster
Rep: 
|
I am not trying to put you on wrong track. Why would I do that. Its me who needs help.
I forgot to mention the OS of the server I am working on in the first post and did not realize that so just gave it in the next post. But then that is very much a relevant information, is not it?
Any how I got the diff but that does not work. That patch is not working.
This is the error while I try to patch
Quote:
patch < python-clamav_0.4.1-1ubuntu2.diff
can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
|
|
|
|
12-30-2009, 05:35 AM
|
#9
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Original Poster
Rep: 
|
Ok I got it running. I was running the patch command from the wrong location. But still I do not find it working.
/usr/local/bin/SquidClamAVReidrector.py -c /etc/squid/SquidClamAVRedirector.conf
The command just does not throw any output and cursor keeps blinking.
I am trying this for the first time and do not know if there should be any output or not.
But if I add this line to the squid, I lose all the internet.
|
|
|
12-30-2009, 02:04 PM
|
#10
|
Member
Registered: May 2009
Posts: 142
Rep:
|
FWIW, when I was using Squid with Clamav I don't recall needing to bind it with any Python glue? I don't recall what I used (which is really helpful - I know) but a quick scout around offers this:
http://freshmeat.net/projects/squidclamav
This works with Squidguard: http://viralator.sourceforge.net/
Untested, but after my experience with Dansguardian anything else is worth a try!
Without being rude, I would have to give Dansguardian a -1. It's great when it works, but the documentation - which you spend days following and trying to unravel, often ends up being out of date and not relevant to the version you are trying to install - it became a nightmare for me and I gave up with it.
Untangle is interesting and worth a look at too - but as a stand alone distro it's not for everyone.
Good luck and sorry that this is probably no more help than a chocolate teapot.
|
|
|
12-30-2009, 11:18 PM
|
#11
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Original Poster
Rep: 
|
Quote:
Originally Posted by Dave_Devnull
|
I did try to use it as well but when tested it gives a lot of errors.
Code:
ERROR -1 = incorrect number of scanned fields
Quote:
Originally Posted by Dave_Devnull
Without being rude, I would have to give Dansguardian a -1. It's great when it works, but the documentation - which you spend days following and trying to unravel, often ends up being out of date and not relevant to the version you are trying to install - it became a nightmare for me and I gave up with it.
|
I have dansguardian-av with me as well. But the version on which it is built is old. So it lacks some of the features from the newer version that I would like to use.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 08:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|