Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

A few days back I tried to install 0ad, a game, through the terminal. I accidentally closed the terminal before it was finished and now I can't install or update any program on my machine. I'm running 13.10.

I have tried searching and found many articles, posts, and discussions around this error but I have yet to find a method that works to fix it.

I have tried running

sudo apt-get clean && sudo apt-get autoremove

which outputs

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-3.11.0-12 linux-headers-3.11.0-12-generic linux-image-3.11.0-12-generic linux-image-extra-3.11.0-12-generic
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 210 MB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 315931 files and directories currently installed.)
Removing linux-headers-3.11.0-12-generic ...
Removing linux-headers-3.11.0-12 ...
Removing linux-image-extra-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-extra-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.11.0-12-generic ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
dkms: removing: bbswitch 0.7 (3.11.0-12-generic) (i686)

-------- Uninstall Beginning --------
Module:  bbswitch
Version: 0.7
Kernel:  3.11.0-12-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

bbswitch.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.11.0-12-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod.....

DKMS: uninstall completed.
dkms: removing: nvidia-319-updates 319.60 (3.11.0-12-generic) (i686)

-------- Uninstall Beginning --------
Module:  nvidia-319-updates
Version: 319.60
Kernel:  3.11.0-12-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

nvidia_319_updates.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.11.0-12-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.11.0-12-generic
 linux-image-3.11.0-12-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then I also tried running

sudo dpkg --configure -a

which outputs

dpkg: dependency problems prevent configuration of linux-image-extra-3.11.0-15-generic:
 linux-image-extra-3.11.0-15-generic depends on linux-image-3.11.0-15-generic; however:
  Package linux-image-3.11.0-15-generic is not configured yet.

dpkg: error processing linux-image-extra-3.11.0-15-generic (--configure):
 dependency problems - leaving unconfigured
Setting up linux-image-3.11.0-17-generic (3.11.0-17.31) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.11.0-17-generic /boot/vmlinuz-3.11.0-17-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.11.0-17-generic.postinst line 1010.
dpkg: error processing linux-image-3.11.0-17-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.11.0-17-generic:
 linux-image-extra-3.11.0-17-generic depends on linux-image-3.11.0-17-generic; however:
  Package linux-image-3.11.0-17-generic is not configured yet.

dpkg: error processing linux-image-extra-3.11.0-17-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.11.0-17-generic; however:
  Package linux-image-3.11.0-17-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-3.11.0-17-generic; however:
  Package linux-image-extra-3.11.0-17-generic is not configured yet.

dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.11.0.17.18); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-pae:
 linux-generic-pae depends on linux-generic (= 3.11.0.17.18); however:
  Package linux-generic is not configured yet.

dpkg: error processing linux-generic-pae (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-extra-3.11.0-15-generic
 linux-image-3.11.0-17-generic
 linux-image-extra-3.11.0-17-generic
 linux-image-generic
 linux-generic
 linux-generic-pae

I'm at a loss and do not know where to go from here.

Any help you could provide will be greatly appreciated.

The output of

uname -r

is

3.11.0-15-generic

EDIT

I ran

sudo dpkg -P linux-image-3.11.0-12-generic

and got output

(Reading database ... 286111 files and directories currently installed.)
Removing linux-image-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-3.11.0-12-generic (--purge):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-3.11.0-12-generic

I then ran

sudo apt-get install -f

and got output

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-3.11.0-12-generic linux-image-extra-3.11.0-12-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
9 not fully installed or removed.
After this operation, 136 MB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 286111 files and directories currently installed.)
Removing linux-image-extra-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-extra-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 35: /etc/default/grub: Syntax error: EOF in backquote substitution
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.11.0-12-generic
 linux-image-3.11.0-12-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
    
Try sudo dpkg -P linux-image-3.11.0-12-generic and run sudo apt-get install -f .Finally post the second command output in your question. –  Avinash Raj Feb 22 at 17:34
    
I lost my network connection after this. I thinks some one screwed up note the "vmlinuz" instead of vmlinux. –  Syborgia Alphas Mar 20 at 16:09
    
A link to understanding vmlinuz; http://en.wikipedia.org/wiki/Vmlinux . Vmlinuz not an error or typo. –  Syborgia Alphas Mar 21 at 1:55

2 Answers 2

I had the same problem, earlier today. I was upgrading to 3.11.0-18. I found a solution here (comment # 3) ; https://answers.launchpad.net/ubuntu/+source/initramfs-tools/+question/244385

share|improve this answer

Add the ppa that is getting the error, this is what worked for me, good luck!

sudo add-apt-repository http://ppa.launchpad.net saucy

sudo apt-get update

share|improve this answer
    
That command won't work. –  Seth Mar 30 at 19:22
    
I just noticed that I'm having to add the onto the sources.list also –  ourcomputergirl Mar 30 at 19:31
    
If you discover problems with your answer, please edit them into the answer itself instead of commenting. –  chaskes Mar 30 at 23:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.