Hallo,
what the prerm script does is stopping the daemon only - it justr calls the sysv-init script from /etc/init.d.
in the fact, it does nothing else than kill/killall/killproc with specified PID (on debian, kill -0 and kill ).
try spawning manually (as root): /etc/init.d/avastd stop
and if it fails, add this line at the beginning of the script:
set -x
it said segmentation problem … And other thing regard about set -x . which conf i must set it … is it at avastd.conf or avastd only
Now i face new problem i cant use apt-get to install other program … it come out like this
server:/etc/init.d# apt-get install gtk
Reading package lists… Done
Building dependency tree… Done
E: The package avast4server needs to be reinstalled, but I can’t find an archive for it.
dpkg --get-selections | grep avast (shows whether it is installed/marked for removal/etc.)
dpkg -P avast4server (will probably contain, because your /var repository is incomplete, as it seems)
then, get the avast4server package from our web site, and install it: dpkg -i
then, repeat the gpkg -P avast4server
this illustrates the wickedness of packaging systems when something wents simply wrong → that’s why i recommend pure tarball-install here. one command more to install, but no similar problems later :).
server:~/software# dpkg -P avast4server
dpkg: error processing avast4server (–purge):
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
Errors were encountered while processing:
avast4server
server:~/software# dpkg --install avast4server-3.0.1-i586.deb
(Reading database … 35973 files and directories currently installed.)
Preparing to replace avast4server 3.0.1 (using avast4server-3.0.1-i586.deb) …
/var/lib/dpkg/info/avast4server.prerm: line 7: 5009 Segmentation fault /etc/init.d/$POS_SCRIPT stop
dpkg: warning - old pre-removal script returned error exit status 139
dpkg - trying script from the new package instead …
/var/lib/dpkg/tmp.ci/prerm: line 7: 5125 Segmentation fault /etc/init.d/$POS_SCRIPT stop
dpkg: error processing avast4server-3.0.1-i586.deb (–install):
subprocess new pre-removal script returned error exit status 139
/usr/sbin/invoke-rc.d: line 437: 5257 Segmentation fault “${INITDPREFIX}${INITSCRIPTID}” “${saction}” “$@”
invoke-rc.d: initscript avastd, action “restart” failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 139
Errors were encountered while processing:
avast4server-3.0.1-i586.deb
So now how suppose i remove this avast … what command i must remove … before i reinstall back … TQ
hallo,
try to get rid of the avastd binary (/usr/sbin/avastd), and replace it with some benign script (which returns true, for example). Then, re-do those steps.
What you did was making libavastengine unusable (thus, avastd couldn’t be run), but you were unable to remove the libavastengine, due to the presence of avastd :). Another solution might be trying to re-install that libavastengine (no need to use debianised packages, feel free to install from tarball, without all this messy dependency hell).
Now i do all everything here… maybe my server cant install avast for this machine. So can you teach me how to i remove the avast from my server… It keep come out error every time i want to install software us apt-get… I give example of it.
server:~/software# apt-get install mailscanner
Reading package lists… Done
Building dependency tree… Done
E: The package avast4server needs to be reinstalled, but I can’t find an archive for it.
server:~/software# apt-get install spamassassin
Reading package lists… Done
Building dependency tree… Done
E: The package avast4server needs to be reinstalled, but I can’t find an archive for it.
So it come out every time if i want install it… Please give the step how to do it. To remove or repair this situation before i install this avast it my server running smooth… somehow i see avast can run it linux i try install now give me more problem… Please help me to solve the matter. Thanks
hallo, as i said somewhere above, re-install the libavastengine first (from its bundle, using dpkg -i …), then, reinstall the avast4server, and since this point, the database should be OK again (then, you can uninstall avast4server and libavastnegine). Best way to avoid these currupted-db states is to install from *.tgz, this doesn’t cooperate with the packaging system at all (a biiig advantage, imho :).
server:~/software# dpkg -i libavastengine-4.7.1-i586.deb
(Reading database … 35973 files and directories currently installed.)
Preparing to replace libavastengine 4.7.1 (using libavastengine-4.7.1-i586.deb)
Unpacking replacement libavastengine …
Setting up libavastengine (4.7.1) …
Installer will insert call for virus database update to the crontab now.
This task can be done by avastvpsupdate.sh or avastvpsupdate.pl.
Installer will check which way is suitable for you, and also will try
to download the latest database version. This step might take up to few
minutes under some circumstances, but can be interrupted anytime by
pressing Ctrl-C (in this case, add the line to the crontab manually
and probably fix the problem in /etc/avastvpsupdate.conf).
AND
server:~/software# dpkg -i avast4server-3.0.1-i586.deb
Selecting previously deselected package avast4server.
(Reading database … 35973 files and directories currently installed.)
Preparing to replace avast4server 3.0.1 (using avast4server-3.0.1-i586.deb) …
/var/lib/dpkg/info/avast4server.prerm: line 7: 13576 Segmentation fault /et c/init.d/$POS_SCRIPT stop
dpkg: warning - old pre-removal script returned error exit status 139
dpkg - trying script from the new package instead …
/var/lib/dpkg/tmp.ci/prerm: line 7: 14165 Segmentation fault /etc/init.d/$P OS_SCRIPT stop
dpkg: error processing avast4server-3.0.1-i586.deb (–install):
subprocess new pre-removal script returned error exit status 139
/usr/sbin/invoke-rc.d: line 437: 14824 Segmentation fault “${INITDPREFIX}${INITSCRIPTID}” “${saction}” “$@”
invoke-rc.d: initscript avastd, action “restart” failed.
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 139
Errors were encountered while processing:
avast4server-3.0.1-i586.deb
So now on what suppose i do? It seem error and error come out… It seem this avast not suite to debian v3.1. Please tell me how i want to remove it… I want use apt-get to install another package … still have error because avast have error package.
server:~/software# apt-get install bind
Reading package lists… Done
Building dependency tree… Done
E: The package avast4server needs to be reinstalled, but I can’t find an archive for it.
Hmm, installing avastengine was OK, as it seems, but avastd is still corrupted. Thus, as I said before - replace the avastd binary (/sbin/avastd) with something benign - for example, script containing this:
In run at background process. But still i got problem to use apt-get … same like avast server have error installation. What suppose to do now i also type i/bin/sh … also have problem also …
server:/usr/local/bin# !/bin/sh
-bash: !/bin/sh: event not found
I think i already fed up… please teach me how can i remove completely all this avast … i ruin my entire server now … especially i want use apt-get it got error about avast … still have error when i want to use it
server:/usr/local/bin# apt-get install mailscanner
Reading package lists… Done
Building dependency tree… Done
E: The package avast4server needs to be reinstalled, but I can’t find an archive for it.
hallo,
of course you cannot type what was intended as file-contents line-per-line at commandprompt. - create file with this contents, chmod 755 it, and that’s it…
OR, just do this dirty thing:
cp which truewhich avastd
hemm… it seem also get error and error … i do step by step … also cant do anything … i just want to know how to remove avastlib ro avastserver from my debian … that all i need now … maybe i install avast to another my centos server to see how it work… Right now what i want just how to i remove all avast thing in my server because i can use apt-get … is everytime come out with error about avast. Thanks hope you can give the step how to remove avast from my debian …
but, what’s wrong is the state of your debian (or ubuntu, whatever) dpkg database. fixing this needs always deeper knowledge (or at least exact reports from your side). error means nothing - got error about avastd spawaning from postrm script? well, just check whether it spawns ok manually. does not? well, replace this binary with something benign that does.
try also: dpkg -P avast4server --force-remove-reinstreq
or another force. depends on the depth of desync in your package database, and the exact errors returned.
server:~# dpkg -P avast4server --force-remove-reinstreq
dpkg: error processing avast4server (–purge):
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
dpkg - warning: ignoring request to remove --force-remove-reinstreq which isn’t installed.
Errors were encountered while processing:
avast4server
that what are come out … In this case it also error and error again … what suppose i do now…
just do what it says - reinstall the avast4 server. does it claim other requirements? fullfillthem (libavastengine). some segfault during these ops? locate the segfault and get rid of it (= replace the segfaulting stuff with something benign).
well, packages can went wrong way and repairing the database might be annoying task, but - just fix what it reports as broken, step-by-step…