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.

I am getting the error:

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

This happened while I was trying to upgrade my PC. I use Eclipse and it keeps on crashing. Please help.

Here's the full text from the Terminal, including the error message:

sanju@sanju-Dell-System-XPS-L502X:~$ upgrade    
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  aisleriot gir1.2-rb-3.0 gir1.2-totem-1.0 gnome-disk-utility gnome-keyring
  libgck-1-0 libgcr-3-1 libtotem0 linux-generic linux-headers-generic
  linux-image-generic rhythmbox rhythmbox-data rhythmbox-mozilla
  rhythmbox-plugin-cdrecorder rhythmbox-plugin-magnatune
  rhythmbox-plugin-zeitgeist rhythmbox-plugins seahorse totem totem-common
  totem-mozilla totem-plugins
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up grub-pc (1.99-21ubuntu3.1) ...
/var/lib/dpkg/info/grub-pc.config: 35: /etc/default/grub: Syntax error: EOF in     backquote substitution
dpkg: error processing grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 grub-pc 
E: Sub-process /usr/bin/dpkg returned an error code (1)    
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Your /etc/default/grub file is incorrect.

  1. open a terminal (Ctrl+Alt+T)
  2. Type this command: gksudo gedit /etc/default/grub,
  3. A text file will open, replace its content by the following standard content: enter image description here

  4. Save the file

  5. Connect internet
  6. In the terminal, type the following commands:

    sudo dpkg --configure -a
    sudo apt-get install -fy
    sudo apt-get update
    sudo apt-get upgrade
    
share|improve this answer
    
Thanku... Its solved... –  Sanju Sony Kurian Jun 26 '12 at 10:33
1  
@LovinBuntu This answer would be greatly improved if you would replace the image showing the text to enter, with the text itself. You can apply code formatting to text with the <$> tool. You can apply code formatting to text that stands inside an ordered or unordered list by indenting it 4 spaces so it's in the list and another 4 spaces so it's shown as code. (See the edit I made to the dpkg and apt-get commands at the end, for how this works.) –  Eliah Kagan Jul 1 '12 at 7:21
add comment

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.