PDA

View Full Version : [SOLVED] 12.04 dpkg: dependency problems prevent configuration of grub-pc



philplasma
November 13th, 2013, 06:31 AM
Hello,

I have a Hanspree netbook dual booting Windows 7 with Ubuntu which I hadn't opened for a few months and when I did version 12.04 came up as a possible download, so I upgraded it. Grub is working in terms of allowing the choice of Ubuntu, however, the error I am getting with it appears to be affecting other things, so I'd like to see if I can fix it.



$sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libswscale0 guile-1.6 libzltext0.10 libsoundtouch1c2 libgwenhywfar47 libbeagle1 liblinebreak1
libaqbanking29-plugins libaqofxconnect5 libpostproc51 libaccess-bridge-java-jni
libaccess-bridge-java libqbanking8 libavformat52 libaqbanking29 guile-1.6-libs
python-gnomedesktop libaqbanking-plugins-libgwenhywfar47 libgnomeprint2.2-data python-metacity
libzlcore0.10 libqthreads-12 python-rsvg libaqhbci17 python-bugbuddy python-totem-plparser
python-evolution libmodplug0c2 libqt3-mt libaqbanking29-plugins-qt libquicktime1 guile-1.6-slib
libgnomeprint2.2-0 libguile-ltdl-1 libmpcdec3 libgnomeprintui2.2-0 libgnomeprintui2.2-common
libiptcdata0 python-gtop libgnomecups1.0-1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
grub-pc
The following packages will be upgraded:
grub-pc
1 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
2 not fully installed or removed.
Need to get 0 B/140 kB of archives.
After this operation, 1,806 kB disk space will be freed.
Do you want to continue? Y
dpkg: dependency problems prevent configuration of grub-pc:
grub-pc depends on grub-common (= 1.98-1ubuntu12); however:
Version of grub-common on system is 1.99-21ubuntu3.10.
dpkg: error processing grub-pc (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of grub-gfxpayload-lists:
grub-gfxpayload-lists depends on grub-pc (>= 1.99~20101210-1ubuntu2); however:
Version of grub-pc on system is 1.98-1ubuntu12.
dpkg: error processing grub-gfxpayload-lists (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
grub-pc
grub-gfxpayload-lists
E: Sub-process /usr/bin/dpkg returned an error code (1)

So you can see that grub-pc depends on grub-common 1.98 but installed there is grub-common 1.99.
Also, grub-gfxpayload-lists depends on grub-pc 1.99 but installed there is grub-pc 1.98.

I've searched for solutions at a few different sites, some say to purge grub-pc and then to install it again (tried, it, didn't work), others said to clear /var/crash to allow for apport reports to be written which could provide more information (tried it, didn't stop the message from appearing).

My ultimate goal is to create a share so I tried to install samba:



$ sudo apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
grub-gfxpayload-lists : Depends: grub-pc (>= 1.99~20101210-1ubuntu2) but 1.98-1ubuntu12 is to be installed
grub-pc : Depends: grub-common (= 1.98-1ubuntu12) but 1.99-21ubuntu3.10 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


I don't have a lot of experience with troubleshooting Ubuntu which is why I decided to post this. I hope that someone has an idea as to what I can do to fix this. Thanks in advance for any assistance.

fantab
November 13th, 2013, 08:02 AM
Remove Grub and then re-install.

Remove:

sudo dpkg --purge grub-pc
sudo apt-get remove --purge grub-pc
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update
sudo grub-install /dev/sdX
[## where 'X' is the HDD Number like /dev/sda or /dev/sdb]
sudo update-grub

It is important to check if you get any more Errors after running 'sudo apt-get update'

philplasma
November 14th, 2013, 03:24 AM
Thanks for the instructions, they almost exactly worked. Here is what I did:

sudo dpkg --purge grub-pc <-- Success

sudo apt-get remove --purge grub-pc <-- one error that fortunately didn't impact the rest:



The following packages have unmet dependencies:
grub-gfxpayload-lists : Depends: grub-pc (>= 1.99~20101210-1ubuntu2) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


sudo apt-get clean <-- appeared to do nothing as nothing was put to the screen when I ran it

sudo apt-get autoremove <-- received the identical message as did the purge above about the grub-gfxpayload-lists dependency

sudo apt-get update <-- success

sudo grub-install /dev/sda <-- got a message saying that the grub-install command is not found

sudo apt-get install grub <-- received the identical message as did the purge above about the grub-gfxpayload-lists dependency

sudo apt-get -f install



The following extra packages will be installed:
grub-pc
The following NEW packages will be installed:
grub-pc
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
1 not fully installed or removed.
Need to get 140 kB of archives.
After this operation, 475 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y


GRUB installed successfully.

sudo apt-get autoremove <-- successfully removed the useless packages

sudo apt-get -f install



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.


All clean!

fantab
November 14th, 2013, 05:37 AM
Good. Does Ubuntu boot as it should?

Bucky Ball
November 14th, 2013, 07:16 AM
Please mark the thread as solved by following the link in my signature. Thanks.

philplasma
November 14th, 2013, 02:26 PM
I should have put this in the post above - yes, as soon as I got the all clean -f install, I rebooted the netbook and grub worked as expected. Thanks again for your help!