Installing File::Scan::ClamAV on Ubuntu 14.04 LTS keeps failing
Not sure if this is the correct forum, but I'll give it a try. I'm attempting to install the above perl module that interfaces Spamassassin with ClamAV and keep getting errors in testing:
Code:
chris@localhost:~$ sudo -s Thanks for any advice/assistance Chris |
The first error is pretty basic. This test fails:
Code:
ok($av->ping); |
Network is up else I would not be able to reply correct?
|
I didn't say it wasn't up; I said it was broken. This works on any box correctly connected to the internet:
ping 8.8.8.8 |
chris@localhost:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=50 time=30.5 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=50 time=30.7 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=50 time=30.9 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=50 time=30.9 ms 64 bytes from 8.8.8.8: icmp_seq=5 ttl=50 time=30.5 ms 64 bytes from 8.8.8.8: icmp_seq=6 ttl=50 time=30.5 ms 64 bytes from 8.8.8.8: icmp_seq=7 ttl=50 time=30.8 ms 64 bytes from 8.8.8.8: icmp_seq=8 ttl=50 time=30.6 ms 64 bytes from 8.8.8.8: icmp_seq=9 ttl=50 time=30.5 ms 64 bytes from 8.8.8.8: icmp_seq=10 ttl=50 time=30.4 ms 64 bytes from 8.8.8.8: icmp_seq=11 ttl=50 time=30.5 ms 64 bytes from 8.8.8.8: icmp_seq=12 ttl=50 time=30.9 ms 64 bytes from 8.8.8.8: icmp_seq=13 ttl=50 time=31.0 ms 64 bytes from 8.8.8.8: icmp_seq=14 ttl=50 time=30.6 ms ^C --- 8.8.8.8 ping statistics --- 14 packets transmitted, 14 received, 0% packet loss, time 13016ms rtt min/avg/max/mdev = 30.438/30.710/31.056/0.270 ms chris@localhost:~$ |
And yet ping failed in the test code. Have a look in t/ping.t and see what it's trying to do.
|
I looked at the test and it is not doing ping; I was misled by the name. It is checking to see if the test can talk to the Clam daemon after it starts it. Evidently it can't. That may be due to running in the CPAN shell. Maybe try installing from the command line:
Code:
perl -MCPAN -e 'install File::Scan::ClamAV' |
I'm not a programmer so here goes my guess:
# start clamd my $pid = fork; die "Fork failed" unless defined $pid; if (!$pid) { exec "$ENV{CLAMD_PATH}/clamd -c clamav.conf"; die "clamd failed to start: $!"; Clamd is located in /usr/sbin clamav.conf is located in /etc/clamav/clamav.conf the clamd.pid file is located in /var/run/clamav the rest of ping.t is: } for (1..10) { last if (-e "clamsock"); if (kill(0 => $pid) == 0) { die "clamd appears to have died"; } sleep(1); } my $av = new File::Scan::ClamAV(port => "clamsock"); ok($av); ok($av->ping); ok(kill(9 => $pid), 1); 1 while (waitpid($pid, &WNOHANG) != -1); unlink("clamsock"); |
Hmm, looks like the same errors
Code:
chris@localhost:~$ sudo -s |
Possibly an issue, in Ubuntu the start-up script for clamd is in /etc/init.d and is called 'clamav-daemon' which to start you service clamav-daemon start on my old Mandriva box the start-up script was in /etc/rc.d/init.d/clamd possibly that is confusing the module install?
|
All times are GMT -5. The time now is 03:15 AM. |