Author Topic: Avast4Server on Ubuntu 8.10 broke Aptitude  (Read 7325 times)

0 Members and 2 Guests are viewing this topic.

semirrahge

  • Guest
Avast4Server on Ubuntu 8.10 broke Aptitude
« on: April 10, 2009, 09:14:46 PM »
For whatever reason, when I tried to install the package 'avast4server-3.0.1-i586.deb' the package manager failed during the install. Immediately thereafter if I tried reinstalling using Gdebi I get:

Could not open 'avast4server-3.0.1-i586.deb' The package might be corrupted or you are not allowed to open the file. Check the permissions of the file.

I know I have ownership and all permissions for the file. When I try running Synaptic it authenticates as normal but then tells me:

E: The package avast4server needs to be reinstalled, but I can't find an archive for it.
E: Internal error opening cache (1). Please report.


and kicks me out.  I don't really care whether I keep Avast! or not, I just want to use my package manager again. :)

Running 'sudo dpkg -i avast4server-3.0.1-i586.deb' produces:

(Reading database ... 128894 files and directories currently installed.)
Preparing to replace avast4server 3.0.1 (using avast4server-3.0.1-i586.deb) ...
.: 93: Can't open /etc/sysconfig/avastd
dpkg: warning - old pre-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
.: 93: Can't open /etc/sysconfig/avastd
dpkg: error processing avast4server-3.0.1-i586.deb (--install):
 subprocess new pre-removal script returned error exit status 2
.: 93: Can't open /etc/sysconfig/avastd
invoke-rc.d: initscript avastd, action "restart" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 avast4server-3.0.1-i586.deb


I did a bit of digging on my own and came up with: 'sudo dpkg --force-remove-reinstreq --remove avast4server' which gave me basically the same thing:

dpkg - warning, overriding problem because --force enabled:
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
(Reading database ... 128893 files and directories currently installed.)
Removing avast4server ...
.: 93: Can't open /etc/sysconfig/avastd
dpkg: error processing avast4server (--remove):
 subprocess pre-removal script returned error exit status 2
.: 93: Can't open /etc/sysconfig/avastd
invoke-rc.d: initscript avastd, action "restart" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 avast4server


Can someone please tell me how to fix this? Any ideas on what caused this in the first place? Any help would be very greatly appreciated.
« Last Edit: April 10, 2009, 09:18:02 PM by semirrahge »

Offline beringel

  • Newbie
  • *
  • Posts: 1
Re: Avast4Server on Ubuntu 8.10 broke Aptitude
« Reply #1 on: April 15, 2009, 12:44:28 AM »
Unfortunately, I have the exact same issue.

Have tried to send a ticket, but can't even register, getting an irritating blank page.

Have now solved the issue by removing the Avast4Server rntry out of the dpkg status and re-saving the file, here is the command used

sudo gedit /var/lib/dpkg/status

The re-installed the deb package, this time without issues.

However, still would like an answer on how to properly solve this.

Rgds
JB

Offline zilog

  • Avast team
  • Advanced Poster
  • *
  • Posts: 946
  • or #f0; daa; add a,#a0; adc a,#40
Re: Avast4Server on Ubuntu 8.10 broke Aptitude
« Reply #2 on: April 15, 2009, 11:34:29 AM »
... and this is exactly why I personally _hate_ all those "nice packaging systems". in the case of any minor change/problem, they might turn into nightmare, which needs deeper user's knowledge anyway (and thus, saves NOTHING, and makes things 10x worse than tarball-driven install).

those problems, in general, can be solved simply by manually-creating those files that are claimed as inaccessible, just to get the automatic script tainted and satisfied. echo "blahblah" >/etc/sysconfig/avastd should be enough :).

first, the package IS correct - /etc/default/avastd is there. And yes, during install, it IS extracted. But, this file is so called "config file", and will stay here and/or won't be refreshed, after package removal or with new reinstall.

just use dpkg --purge avast4server, and then, make a fresh install, and things would be OK.
well, /etc/init.d/avastd should be prepared also for this inconsistency, not claiming defaults to be present/readable, we'll add this check too, thanks for report,

pc



May's Law: Software efficiency halves every 18 months, compensating Moore's Law. (David May, INMOS)

smokinbuddah

  • Guest
Re: Avast4Server on Ubuntu 8.10 broke Aptitude
« Reply #3 on: December 12, 2009, 10:04:53 AM »
the only thing that actually worked is:

rm /var/lib/dpkg/info/avast4server.prerm
dpkg -P --force-all avast4server


cheers