Web lists-archives.com

Re: Synaptic error message -- how to respond

On 04/24/2019 03:42 PM, Thomas D Dial wrote:
On Wed, 2019-04-24 at 10:42 -0500, Richard Owlett wrote:
I have repeatedly received the following error message:
E: galternatives: package is in a very bad inconsistent state;
you should  reinstall it before attempting configuration

I don't recall what triggered it last week. Today I wanted to install
"apt-rdepends" which displayed the above error message. I closed the
message window. The box next to apt-rdepends was colored green
indicating it had been successfully installed. I did a test run of it
and got reasonably looking output.

I attempt to reinstall "galternatives" and receive:
E: /var/cache/apt/archives/galternatives_0.13.5+nmu4+deb9u1_all.deb:
subprocess new pre-removal script returned error exit status 1

What should I do next?

Look carefully at everything from the

"apt install --reinstall galternatives"

command to the end of the output from it. It shouldn't be all that long
but is likely to have diagnostic information you can use to identify and
correct the problem. If that doesn't clarify it enough, post the output,
  all of it. Many of us have seen install failures from time to time and
given enough output might have suggestions. Exit code from a script
bundled in the .deb file is too generic to be useful by itself.

Tom Dial

Where the error is is fairly clear. But what to do about is not.
My interpretation is there a problem with the repository.

Not being sure how short the output would be I saved the output to a file.

My terminal session:
richard@fromdell:~$ su
Password: root@fromdell:/home/richard# apt install --reinstall galternatives > diagnostic

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

E: Sub-process /usr/bin/dpkg returned an error code (1)

The contents of file "diagnostic" is:
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 251 not upgraded.
3 not fully installed or removed.
Need to get 0 B/148 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%

[snip repetitive info]
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 176998 files and directories currently installed.)

Preparing to unpack .../galternatives_0.13.5+nmu4+deb9u1_all.deb ...

  File "/usr/bin/pyclean", line 63

    except (IOError, OSError), e:


SyntaxError: invalid syntax

dpkg: warning: subprocess old pre-removal script returned error exit status 1

dpkg: trying script from the new package instead ...

  File "/usr/bin/pyclean", line 63

    except (IOError, OSError), e:


SyntaxError: invalid syntax

dpkg: error processing archive /var/cache/apt/archives/galternatives_0.13.5+nmu4+deb9u1_all.deb (--unpack):

 subprocess new pre-removal script returned error exit status 1

Traceback (most recent call last):

  File "/usr/bin/pycompile", line 35, in <module>

    from debpython.version import SUPPORTED, debsorted, vrepr, \

  File "/usr/share/python/debpython/version.py", line 24, in <module>

    from ConfigParser import SafeConfigParser

ImportError: No module named 'ConfigParser'

dpkg: error while cleaning up:

 subprocess installed post-installation script returned error exit status 1

Errors were encountered while processing:


I see the error message but do not know what to do.
Thanks for pointers.