[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: help? dpkg db screwed up



On Mon, 18 Jun 2001, Iain wrote:
> I seem to have put the dpkg database into a bad state.
> I was attempting to install phpgroupware from unstable onto a potato system.
> Anyway somewhere along the installation process it screwed up so I tried to remove
> it.
>
> dpkg -r phpgroupware
>
> gives the following:
>
> dpkg: error processing phpgroupware (--remove):
>  Package is in a very bad inconsistent state - you should
>  reinstall it before attempting a removal.
> Errors were encountered while processing:
>  phpgroupware
>
> Reinstalling it gives the following:
>
> Selecting previously deselected package phpgroupware.
> (Reading database ... 16354 files and directories currently installed.)
> Preparing to replace phpgroupware 0.9.10v-6 (using phpgroupware_0.9.10v-6_all.deb)
> ...
> Unpacking replacement phpgroupware ...
> dpkg: warning - old post-removal script returned error exit status 10
> dpkg - trying script from the new package instead ...
> dpkg: error processing phpgroupware_0.9.10v-6_all.deb (--install):
>  subprocess new post-removal script returned error exit status 10
> dpkg: error while cleaning up:
>  subprocess post-removal script returned error exit status 10
> Errors were encountered while processing:
>  phpgroupware_0.9.10v-6_all.deb

Hmmm, there should be something in the "..." bit that tells you what
the actual problem is, and (about?) which line of the post-removal
script is causing the problem -- comment out that line (in
/var/lib/dpkg/info/phpgroupware.postrm) and try using the pkg mgt
tools again (make note of what the line is supposed to do, just in
case you need to do it manually).

As a last resort, or if it is a small (few files) package, you can
manually remove it:
- run any necessary commands from the pre and post removal scripts
- rm all the files listed in /var/lib/pkg/info/phpgroupware.list that
  do not also belong to another software package
- edit out the entry for phpgroupware in /var/lib/dpkg/status

> I have tried dpkg -r --force-remove-reinstreq phpgroupware
>
> but it doesn't work either.
>
> Is there some way I can get things back to normal? Please help.

There are usually a few options, but without seeing the full text of
the messages you are getting it is tough to say which is the best fix.

HTH

- Bruce



Reply to: