Wednesday, November 17, 2010

Fix for dpkg: error processing linux-image-2.6.35-22-generic-pae...exit status 2

I have been get a set of errors listed below, someone posted a fix.
/etc/default/grub: 23: Syntax error: newline unexpected
dpkg: error processing linux-image-2.6.35-22-generic-pae (--configure):
 subprocess installed post-installation script returned error exit status 2
Sub-process /usr/bin/dpkg returned an error code (1)

I tried dpkg --configure -a and  apt-get -f install this did nothing for me. I read that some had success with that combination.

What I did was to open a terminal:

cd /var/lib/dpkg/info

I then I made a temporary directory:

mkdir  temp

then I moved the files associated with the error:

mv linux-headers-2.6.35-22*

then I ran

apt-get install -f


apt-get update && apt-get upgrade

after that the error was gone. I was still in the /var/lib/dpkg/info directory, so; I deleted the temp directory by running.

rm -r temp