it’s hard to help if I don’t know, which distribution you use

avast4guard rpm package use PRE scriptlet to check if already installed avastguard is running during the installation
here’s what the scriptlet do:
[ -f /etc/init.d/avastguard ] && /sbin/service avastguard stop

to skip the scriptlet, simply use ‘–nopre’ switch when running ‘rpm’ command