apt gives dpkg unrecoverable fatal error

Asked by rob stanton

Hi, hope you can help. I have a copy of Linux Mint 9 Isadora, based on Ubuntu. When I do a system update the the system come up with "preconfiguring packages...
dpkg: unrecoverable fatal error, aborting:
 syntax error: unknown group 'gnokii' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)

I tried this with update manager with the following error. I then tried uninstalling gnokii and tried again, same error.
I then tried sudo apt-get clean (not indication of anything)
sudo apt-get update (reading package list... done)
sudo apt-get upgrade

This produced Fetched 154MB in 6min 10s (415B/s)
Extract templates from packages: 100%
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 syntax error: unknown group 'gnokii' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)

Bit stuck now...

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
rob stanton
Solved:
Last query:
Last reply:
Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#1

Hi,

First please make sure to close all open programs, including all package managers like Synaptic, Add/remove programs, etc ...

Then please try this workaround procedure:

Step 1: Run this command:

gksudo gedit /var/lib/dpkg/statoverride

Step 2: REMOVE the line containing the word gnokii in the statoverride file

Step 3: Save change to /var/lib/dpkg/statoverride file

Step 4: Open Terminal from "Applications->Accessories->
Terminal"

Step 5: Please COPY-PASTE each line below into the Terminal then hit <enter> after each line)

Tip: If you have a wheel mouse or 3 button mouse, you do not need to type commands into the Terminal. Highlight the command written on the webpage. Move your cursor anywhere in the Terminal and press the wheel or middle button. Automatic Copy and paste! No spelling mistakes! No Typos! No other errors!

sudo addgroup gnokii
sudo dpkg-statoverride --remove /usr/sbin/mgnokiidev
sudo delgroup gnokii

cat /etc/lsb-release
uname -a
sudo rm /var/lib/apt/lists/lock
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
sudo rm /var/cache/apt/*.bin
LANG=C;sudo apt-get clean
LANG=C;sudo apt-get autoclean
LANG=C;sudo apt-get --purge autoremove
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
sudo dpkg --clear-avail
sudo dpkg --configure -a
LANG=C;sudo apt-get -f install
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade

Step 6: Please post results (copy/paste terminal output from each command) on this thread

Hope it helps,

Regards,

Mark

Revision history for this message
rob stanton (rs-ntlworld) said :
#2

Hi Mark,

Tried you script but ended up with the same error!
in your line sudo dpkg-statoverride --remove /usr/sbin/mgnokiidev it came back with

dpkg-statoverrides: unrecoverable fatal error, aborting:
 statoverrides file contains empty line

Thank for the help so far...

Revision history for this message
rob stanton (rs-ntlworld) said :
#3

ops tried again with system update and it all worked ok. Thanks for the help no way I've now all that !

Revision history for this message
Claudia (bioclyde-gmail) said :
#4

finally, thank you Mark. I knew that the statoverride file was corrupt, but I had no idea where to edit it. I had a similar error but it was the "amavis" I removed the line and did exactly what you suggested, now I can use my update manager again, and my synaptic package manager.