HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   The Perfect Server - CentOS 6.2 x86_64 With Apache2 [ISPConfig 3] - CLAMD (http://www.howtoforge.com/forums/showthread.php?t=55742)

epretorious 13th January 2012 06:35

The Perfect Server - CentOS 6.2 x86_64 With Apache2 [ISPConfig 3] - CLAMD
 
While performing Step 14 ("Install Amavisd-new, SpamAssassin And ClamAV") of "The Perfect Server - CentOS 6.2 x86_64 With Apache2 [ISPConfig 3]" yum complained...

Code:

[eric@ispconfig-1 downloads]$ sudo yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql
...
Installing : clamd-.97.3-2.el6.i686                                                        25/53
Non-fatal POSTIN scriptlet failure in rpm package clamd-0.97.3-2.el6.i686
error reading information on service clamd: No such file or directory
warning: %post(clamd-0.97.3-2.el6.i686) scriptlet failed, exit status 1

Any ideas what might have caused this?

falko 13th January 2012 15:23

Can you log in as root directly instead of using sudo?

epretorious 13th January 2012 16:28

Quote:

Originally Posted by falko (Post 271390)
Can you log in as root directly instead of using sudo?

Yes, but it doesn't fix the problem:

Code:

[root@ispconfig-1 ~]# yum reinstall clamd
Loaded plugins: fastestmirror, priorities, security
Setting up Reinstall Process
Loading mirror speeds from cached hostfile
epel/metalink                                              |  12 kB    00:00
 * base: centos.mirror.facebook.net
 * epel: linux.mirrors.es.net
 * extras: mirror.hmc.edu
 * updates: centos.mirrors.hoobly.com
base                                                        | 3.7 kB    00:00
extras                                                      | 3.5 kB    00:00
updates                                                    | 3.5 kB    00:00
Resolving Dependencies
--> Running transaction check
---> Package clamd.i686 0:0.97.3-2.el6 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================
 Package          Arch        Version            Repository          Size
==============================================================================
Reinstalling:
 clamd            i686        0.97.3-2.el6        epel                131 k

Transaction Summary
==============================================================================
Reinstall    1 Package(s)

Total download size: 131 k
Installed size: 386 k
Is this ok [y/N]: y
Downloading Packages:
clamd-0.97.3-2.el6.i686.rpm                                | 131 kB    00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : clamd-0.97.3-2.el6.i686                      1/1
Non-fatal POSTIN scriptlet failure in rpm package clamd-0.97.3-2.el6.i686
error reading information on service clamd: No such file or directory
warning: %post(clamd-0.97.3-2.el6.i686) scriptlet failed, exit status 1

Installed:
  clamd.i686 0:0.97.3-2.el6

Complete!

Checking the package's scripts and the package list reveals the problem, however: There are no init.d scripts for the clamd service - only the init.d script for clamav!

Code:

[root@ispconfig-1 ~]# rpm -q --scripts clamd
preinstall scriptlet (using /bin/sh):
getent group clam >/dev/null || groupadd -r clam
getent passwd clam >/dev/null || \
useradd -r -g clam -d /var/clamav -s /sbin/nologin \
    -c "Clam Anti Virus Checker" clam
exit 0


postinstall scriptlet (using /bin/sh):
/sbin/chkconfig --add clamd

preuninstall scriptlet (using /bin/sh):
if [ $1 -eq 0 ]; then
        /sbin/service clamd stop &>/dev/null || :
        /sbin/chkconfig --del clamd
fi
postuninstall scriptlet (using /bin/sh):

/sbin/service clamd condrestart &>/dev/null || :


[root@ispconfig-1 ~]# rpm -ql clamd
/etc/clamd.conf
/etc/clamd.d
/etc/logrotate.d/clamav
/etc/rc.d/init.d/clamav
/usr/bin/clamconf
/usr/bin/clamdscan
/usr/sbin/clamd
/usr/share/clamav/README.clamd-wrapper
/usr/share/clamav/clamd-wrapper
/usr/share/clamav/clamd.init
/usr/share/clamav/clamd.sysconfig
/usr/share/doc/clamd-0.97.3
/usr/share/doc/clamd-0.97.3/clamd.conf
/usr/share/man/man1/clambc.1.gz
/usr/share/man/man1/clamconf.1.gz
/usr/share/man/man1/clamdscan.1.gz
/usr/share/man/man1/clamdtop.1.gz
/usr/share/man/man5/clamd.conf.5.gz
/usr/share/man/man8/clamd.8.gz
/var/lib/clamav
/var/log/clamav
/var/log/clamav/clamd.log
/var/run/clamav


avgeek 13th January 2012 16:34

First, Thanks for a great Tutorial Falko.

I too am running in to the same problem with clamd. The first time I installed it as 'su', then reading your post , completely logged out and logged back in directly as root with the same result. I attempted to install using yum as well as downloading the rpm and installing it that way. Do you think compiling locally might work?

The error that yum gave during the first attempt is

Non-fatal POSTIN scriptlet failure in rpm package clamd-0.97.3-2.el6.i686
error reading information on service clamd: No such file or directory
warning: %post(clamd-0.97.3-2.el6.i686) scriptlet failed, exit status 1

There were also problems trying to remove it once installed (summary)
[root@web phpMyAdmin]# yum remove clamd
--> Processing Dependency: /usr/sbin/clamd for package: amavisd-new-2.6.4-2.el6.noarch
--> Processing Dependency: /etc/clamd.d for package: amavisd-new-2.6.4-2.el6.noarch
---> Package amavisd-new.noarch 0:2.6.4-2.el6 will be erased
blahblahblah
Running Transaction
Erasing : amavisd-new-2.6.4-2.el6.noarch 1/2
Shutting down amavisd: [FAILED]

Stopping clamd.amavisd: [FAILED]
Error in PREUN scriptlet in rpm package clamd
clamd-0.97.3-2.el6.i686 was supposed to be removed but is not!

Dependency Removed:
amavisd-new.noarch 0:2.6.4-2.el6

Failed:
clamd.i686 0:0.97.3-2.el6
Complete!

epretorious 13th January 2012 16:49

Quote:

Originally Posted by epretorious (Post 271393)
Checking the package's scripts and the package list reveals the problem, however: There are no init.d scripts for the clamd service - only the init.d script for clamav!

Therefore, it stands to reason that there's an error in Step 14 ("Install Amavisd-new, SpamAssassin And ClamAV"):
Code:

[eric@ispconfig-1 suphp-0.7.1]$ sudo chkconfig --del clamd
error reading information on service clamd: No such file or directory

Could this be due to a recent change in the clamd package?
Code:

[eric@ispconfig-1 ~]$ rpm -q --changelog clamd | head
* Fri Nov 25 2011 Philip Prindeville <philipp@fedoraproject.org> - 0.97.3-2
- Add missing clamd-wrapper supporting files
- Remove from init script the unused CLAMD_SOCKET variable

* Tue Oct 18 2011 Nick Bebout <nb@fedoraproject.org> - 0.97.3-1
- Update to 0.97.3
- Fix CVE-2011-3627 clamav: Recursion level crash fixed in v0.97.3

I'll send Philip (above) an e-mail letting him know about the bug.

epretorious 13th January 2012 20:41

Quote:

Originally Posted by epretorious (Post 271399)
Could this be due to a recent change in the clamd package?

I'll send Philip (above) an e-mail letting him know about the bug.

Done.

This is a known issue:
Quote:

From: Philip Prindeville <philipp@fedoraproject.org>
To: Eric <XXX@yahoo.com>
Sent: Friday, January 13, 2012 11:24 AM
Subject: Re: Bug Report: clamd-0.97.3-2.el6.i686

Did you search the Fedora database for open bugs?

This is a known issue and a fix is being tested.

-Philip

jz_ 14th January 2012 08:41

If I and attempted to install it twice and I have the same error

reported error:
Code:

[root@nox-server ~]# chkconfig --del clamd
error al leer la informaciĆ³n del servicio clamd: No existe el fichero o el directorio
[root@nox-server ~]# yum reinstall clamd
Loaded plugins: fastestmirror, priorities, security
Setting up Reinstall Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                    |  18 kB    00:00
 * base: centos.mirror.xtratelecom.es
 * epel: ftp.cica.es
 * extras: centos.mirror.xtratelecom.es
 * rpmforge: fr2.rpmfind.net
 * updates: centos.mirror.xtratelecom.es
base                                                                              | 3.7 kB    00:00
extras                                                                            | 3.5 kB    00:00
rpmforge                                                                          | 1.1 kB    00:00
updates                                                                          | 3.5 kB    00:00
1100 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package clamd.x86_64 0:0.97.3-2.el6 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================
 Package              Arch                  Version                        Repository            Size
=========================================================================================================
Reinstalling:
 clamd                x86_64                0.97.3-2.el6                    epel                133 k

Transaction Summary
=========================================================================================================
Reinstall    1 Package(s)

Total download size: 133 k
Installed size: 415 k
Is this ok [y/N]: y
Downloading Packages:
clamd-0.97.3-2.el6.x86_64.rpm                                                    | 133 kB    00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : clamd-0.97.3-2.el6.x86_64                                                            1/1
Non-fatal POSTIN scriptlet failure in rpm package clamd-0.97.3-2.el6.x86_64
error al leer la informaciĆ³n del servicio clamd: No existe el fichero o el directorio
warning: %post(clamd-0.97.3-2.el6.x86_64) scriptlet failed, exit status 1


Installed:
  clamd.x86_64 0:0.97.3-2.el6

Complete!

I expect a solution soon thanks

ghostshell 26th April 2012 21:13

I ran into the same issue when updating recently. Here is the fix i found and documented.

http://www.jpgottech.com/support/kno....php?article=7


All times are GMT +2. The time now is 08:29.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.