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 |
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.
|
 |
07-20-2014, 04:58 PM
|
#1
|
Member
Registered: Aug 2002
Location: Copperas Cove, Texas
Distribution: Ubuntu 20.04 LTS
Posts: 304
Rep:
|
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
[sudo] password for chris:
root@localhost:~# perl -MCPAN -e shell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.
cpan[1]> install File::Scan::ClamAV
CPAN.pm: Building J/JA/JAMTUR/File-Scan-ClamAV-1.91.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for File::Scan::ClamAV
Writing MYMETA.yml and MYMETA.json
cp lib/File/Scan/ClamAV.pm blib/lib/File/Scan/ClamAV.pm
Manifying blib/man3/File::Scan::ClamAV.3pm
JAMTUR/File-Scan-ClamAV-1.91.tar.gz
/usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 CLAMD_PATH=/usr/sbin /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00basic.t ....... ok
t/01ping.t ........ 1/3 # Failed test 2 in t/01ping.t at line 26
# t/01ping.t line 26 is: ok($av->ping);
t/01ping.t ........ Failed 1/3 subtests
t/02reload.t ...... 1/3 # Failed test 2 in t/02reload.t at line 25
# t/02reload.t line 25 is: ok($av->reload);
t/02reload.t ...... Failed 1/3 subtests
t/03quit.t ........ 1/4 # Failed test 2 in t/03quit.t at line 31
# t/03quit.t line 31 is: ok($av->quit);
t/03quit.t ........ 3/4 ERROR: LOCAL: Socket file /root/.cpan/build/File-Scan-ClamAV-1.91-_962_7/clamsock could not be bound: Permission denied
t/03quit.t ........ Failed 1/4 subtests
t/04scan.t ........ 1/8 # Test 4 got: "" (t/04scan.t at line 36)
# Expected: "1" (Didn't detect /root/.cpan/build/File-Scan-ClamAV-1.91-_962_7/testfiles/clamavtest)
# t/04scan.t line 36 is: ok(exists($results{"$testdir/clamavtest"}), 1, "Didn't detect $testdir/clamavtest");
# Test 5 got: "" (t/04scan.t at line 37)
# Expected: "1" (Didn't detect /root/.cpan/build/File-Scan-ClamAV-1.91-_962_7/testfiles/clamavtest.zip)
# t/04scan.t line 37 is: ok(exists($results{"$testdir/clamavtest.zip"}), 1, "Didn't detect $testdir/clamavtest.zip");
# Test 6 got: "" (t/04scan.t at line 38)
# Expected: "1" (Didn't detect /root/.cpan/build/File-Scan-ClamAV-1.91-_962_7/testfiles/clamavtest.gz)
# t/04scan.t line 38 is: ok(exists($results{"$testdir/clamavtest.gz"}), 1, "Didn't detect $testdir/clamavtest.gz");
t/04scan.t ........ Failed 3/8 subtests
t/05streamscan.t .. 1/8 # Test 5 got: <UNDEF> (t/05streamscan.t at line 43)
# Expected: "FOUND"
# t/05streamscan.t line 43 is: ok($ans, 'FOUND');
# Test 6 got: <UNDEF> (t/05streamscan.t at line 44)
# Expected: "ClamAV-Test-Signature"
# t/05streamscan.t line 44 is: ok($vir, 'ClamAV-Test-Signature');
t/05streamscan.t .. Failed 2/8 subtests
t/pod-coverage.t .. ok
t/pod.t ........... ok
Test Summary Report
-------------------
t/01ping.t (Wstat: 0 Tests: 3 Failed: 1)
Failed test: 2
t/02reload.t (Wstat: 0 Tests: 3 Failed: 1)
Failed test: 2
t/03quit.t (Wstat: 0 Tests: 4 Failed: 1)
Failed test: 2
t/04scan.t (Wstat: 0 Tests: 8 Failed: 3)
Failed tests: 4-6
t/05streamscan.t (Wstat: 0 Tests: 8 Failed: 2)
Failed tests: 5-6
Files=8, Tests=29, 53 wallclock secs ( 0.04 usr 0.01 sys + 49.99 cusr 2.21 csys = 52.25 CPU)
Result: FAIL
Failed 5/8 test programs. 8/29 subtests failed.
make: *** [test_dynamic] Error 255
JAMTUR/File-Scan-ClamAV-1.91.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports JAMTUR/File-Scan-ClamAV-1.91.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
JAMTUR/File-Scan-ClamAV-1.91.tar.gz : make_test NO
cpan[2]> exit
Terminal does not support GetHistory.
Lockfile removed.
Output of any SA process. In this case I just ran sa-learn --dump magic, errors noted below:
chris@localhost:~$ sa-learn --dump magic
plugin: failed to parse plugin /etc/spamassassin/clamav.pm: Can't locate File/Scan/ClamAV.pm in @INC (you may need to install the File::Scan::ClamAV module) (@INC contains: lib /usr/share/perl5 /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl) at /etc/spamassassin/clamav.pm line 14.
BEGIN failed--compilation aborted at /etc/spamassassin/clamav.pm line 14.
Compilation failed in require at /usr/share/perl5/Mail/SpamAssassin/PluginHandler.pm line 109.
Anyone with any ideas on what to do? I tried to find the module in the Ubuntu repositories but couldn't.
Thanks for any advice/assistance
Chris
|
|
|
07-21-2014, 09:53 AM
|
#2
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,316
|
The first error is pretty basic. This test fails:
That means it can't do ping so your network is broken.
|
|
|
07-21-2014, 11:49 AM
|
#3
|
Member
Registered: Aug 2002
Location: Copperas Cove, Texas
Distribution: Ubuntu 20.04 LTS
Posts: 304
Original Poster
Rep:
|
Network is up else I would not be able to reply correct?
|
|
|
07-21-2014, 12:34 PM
|
#4
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,316
|
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
|
|
|
07-21-2014, 12:36 PM
|
#5
|
Member
Registered: Aug 2002
Location: Copperas Cove, Texas
Distribution: Ubuntu 20.04 LTS
Posts: 304
Original Poster
Rep:
|
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:~$
|
|
|
07-21-2014, 01:14 PM
|
#6
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,316
|
And yet ping failed in the test code. Have a look in t/ping.t and see what it's trying to do.
|
|
|
07-21-2014, 03:20 PM
|
#7
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,316
|
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'
|
|
|
07-21-2014, 03:51 PM
|
#8
|
Member
Registered: Aug 2002
Location: Copperas Cove, Texas
Distribution: Ubuntu 20.04 LTS
Posts: 304
Original Poster
Rep:
|
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");
|
|
|
07-21-2014, 04:11 PM
|
#9
|
Member
Registered: Aug 2002
Location: Copperas Cove, Texas
Distribution: Ubuntu 20.04 LTS
Posts: 304
Original Poster
Rep:
|
Hmm, looks like the same errors
Code:
chris@localhost:~$ sudo -s
[sudo] password for chris:
root@localhost:~# perl -MCPAN -e 'install File::Scan::ClamAV'
Reading '/home/chris/.cpan/Metadata'
Database was generated on Mon, 21 Jul 2014 17:53:02 GMT
Running install for module 'File::Scan::ClamAV'
Running make for J/JA/JAMTUR/File-Scan-ClamAV-1.91.tar.gz
Checksum for /home/chris/.cpan/sources/authors/id/J/JA/JAMTUR/File-Scan-ClamAV-1.91.tar.gz ok
CPAN.pm: Building J/JA/JAMTUR/File-Scan-ClamAV-1.91.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for File::Scan::ClamAV
Writing MYMETA.yml and MYMETA.json
cp lib/File/Scan/ClamAV.pm blib/lib/File/Scan/ClamAV.pm
Manifying blib/man3/File::Scan::ClamAV.3pm
JAMTUR/File-Scan-ClamAV-1.91.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 CLAMD_PATH=/usr/sbin /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00basic.t ....... ok
t/01ping.t ........ 1/3 # Failed test 2 in t/01ping.t at line 26
# t/01ping.t line 26 is: ok($av->ping);
t/01ping.t ........ Failed 1/3 subtests
t/02reload.t ...... 1/3 # Failed test 2 in t/02reload.t at line 25
# t/02reload.t line 25 is: ok($av->reload);
t/02reload.t ...... Failed 1/3 subtests
t/03quit.t ........ 1/4 # Failed test 2 in t/03quit.t at line 31
# t/03quit.t line 31 is: ok($av->quit);
t/03quit.t ........ 3/4 ERROR: LOCAL: Socket file /home/chris/.cpan/build/File-Scan-ClamAV-1.91-qMlSN_/clamsock could not be bound: Permission denied
t/03quit.t ........ Failed 1/4 subtests
t/04scan.t ........ 2/8 # Test 4 got: "" (t/04scan.t at line 36)
# Expected: "1" (Didn't detect /home/chris/.cpan/build/File-Scan-ClamAV-1.91-qMlSN_/testfiles/clamavtest)
# t/04scan.t line 36 is: ok(exists($results{"$testdir/clamavtest"}), 1, "Didn't detect $testdir/clamavtest");
# Test 5 got: "" (t/04scan.t at line 37)
# Expected: "1" (Didn't detect /home/chris/.cpan/build/File-Scan-ClamAV-1.91-qMlSN_/testfiles/clamavtest.zip)
# t/04scan.t line 37 is: ok(exists($results{"$testdir/clamavtest.zip"}), 1, "Didn't detect $testdir/clamavtest.zip");
# Test 6 got: "" (t/04scan.t at line 38)
# Expected: "1" (Didn't detect /home/chris/.cpan/build/File-Scan-ClamAV-1.91-qMlSN_/testfiles/clamavtest.gz)
# t/04scan.t line 38 is: ok(exists($results{"$testdir/clamavtest.gz"}), 1, "Didn't detect $testdir/clamavtest.gz");
t/04scan.t ........ Failed 3/8 subtests
t/05streamscan.t .. 1/8 # Test 5 got: <UNDEF> (t/05streamscan.t at line 43)
# Expected: "FOUND"
# t/05streamscan.t line 43 is: ok($ans, 'FOUND');
# Test 6 got: <UNDEF> (t/05streamscan.t at line 44)
# Expected: "ClamAV-Test-Signature"
# t/05streamscan.t line 44 is: ok($vir, 'ClamAV-Test-Signature');
t/05streamscan.t .. Failed 2/8 subtests
t/pod-coverage.t .. ok
t/pod.t ........... ok
Test Summary Report
-------------------
t/01ping.t (Wstat: 0 Tests: 3 Failed: 1)
Failed test: 2
t/02reload.t (Wstat: 0 Tests: 3 Failed: 1)
Failed test: 2
t/03quit.t (Wstat: 0 Tests: 4 Failed: 1)
Failed test: 2
t/04scan.t (Wstat: 0 Tests: 8 Failed: 3)
Failed tests: 4-6
t/05streamscan.t (Wstat: 0 Tests: 8 Failed: 2)
Failed tests: 5-6
Files=8, Tests=29, 61 wallclock secs ( 0.04 usr 0.01 sys + 38.97 cusr 2.86 csys = 41.88 CPU)
Result: FAIL
Failed 5/8 test programs. 8/29 subtests failed.
make: *** [test_dynamic] Error 255
JAMTUR/File-Scan-ClamAV-1.91.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports JAMTUR/File-Scan-ClamAV-1.91.tar.gz
Running make install
make test had returned bad status, won't install without force
root@localhost:~#
Doing this as 'sudo' should work shouldn't it? On the old Mandriva box I used to always su - to root to do things such as this.
|
|
|
07-21-2014, 05:22 PM
|
#10
|
Member
Registered: Aug 2002
Location: Copperas Cove, Texas
Distribution: Ubuntu 20.04 LTS
Posts: 304
Original Poster
Rep:
|
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 06:17 PM.
|
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
|
|