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

Re: "Package is in a very bad inconsistent state" and j2sdk1.4

H. S. wrote:

I am helping a guy by email who has a freshly installed Sarge system. He is totally new to Debian and he was helped by a friend during his first install.

His friend is away and I am now helping this guy in solving this problem that he is having while installing (and now while removing) j2sdk1.4. If he tries to remove this package, he gets:
Do you what to continue? [Y/n] y
Preconfiguring packages ...
dpkg: error processing j2sdk1.4 {--remove):
  package is in a very bad inconsistant state - you
should reinstall it before atempting a removal
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code

He gets this when he tried "dpkg --purge j2sdk1.4", "apt-get dist-upgrade" or "apt-get "--purge remove j2sdk1.4".

I have suggested him to try:
1) #> dpkg --purge --force-remove-reinstreq j2sdk1.4

2) the following procedure if 1) above does not work.
a. dpkg --listfiles <package name>
Find every file that was installed, then do a search and destroy.

b. Edit the file /var/lib/dpkg/status
Remove the section for your badly broken package

c. Edit the file /var/lib/dpkg/available
Remove the section for your badly broken package

Just wanted to know if somebody has seen this before or if somebody has other suggestions.


Yes, I'm a newbie and already have encountered this several times. I don't know about the steps you list, but the apt-howto gives some 'survival' advice:

dpkg --configure -a
apt-get -f install
< repeat until problem goes away >

I found these 2 steps didn't succeed for me. My work around was to install the older version of the package (in your case j2sdk1.4) and it overwrote and purged out the bad junk. So, if you have an old version available, give that a try. For j2sdk1.4, you may have difficulty finding an earlier version .. if so, use the 'java-package' to convert the java source from sun into a debian package, and then install your new (good) java over the old junk.

Whatever the level of frustration, don't give up, because it will work through eventually.


Reply to: