Linux - NewbieThis 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.
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.
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
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?
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486
Rep:
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 ! "
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?
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486
Rep:
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]
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?
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.
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:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.