Documenting Problems That Were Difficult To Find The Answer To

Ubuntu dpkg Package Missing Final Newline

I’ve yet to understand why it is happening. But at least I have a temporary cure.

You get a message like the following while running apt-get upgrade:

dpkg: unrecoverable fatal error, aborting:
 files list file for package 'apache2-mpm-prefork' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

Temporary Fix

You have to move apt’s information about the package out of the way and then re-install the package. As follows:

server:root# mv /var/lib/dpkg/info/apache2-mpm-prefork.* \

server:root# apt-get install --reinstall apache2-mpm-prefork
dpkg: warning: files list file for package 'apache2-mpm-prefork' missing; assuming package has no files currently installed

If you get warnings about other packages missing newlines repeat the procedure recursively.

Once you’ve done this you should be able to run an apt-get upgrade cleanly.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: