Fix Ubuntu Unmet Dependencies Issue

When I try to install s2e in my Ubuntu 12.04, there is a weired problem happens. It give the following error message when I try to install some of the libraries. Google directed me to the following solution, which worked perfectly for me.

error

 1[2][21:36:18][rui@~]$sudo apt-get install libsdl1.2-dev
 2
 3Reading package lists... Done
 4
 5Building dependency tree
 6
 7Reading state information... Done
 8
 9Some packages could not be installed. This may mean that you have
10
11requested an impossible situation or if you are using the unstable
12
13distribution that some required packages have not yet been created
14
15or been moved out of Incoming.
16
17The following information may help to resolve the situation:
18
19
20
21The following packages have unmet dependencies:
22
23 libsdl1.2-dev : Depends: libpulse-dev but it is not going to be installed
24
25E: Unable to correct problems, you have held broken packages.

Solution

First a downgrade is required and done with the following: create the ‘preferences’ file:

1sudo vi /etc/apt/preferences

and insert the following lines:

1Package: *
2Pin: release a=precise*
3Pin-Priority: 2012

enter :wq to write the file. Pin-Priority must be greater than 1000.

Then you may downgrade the offending applications with:

1sudo apt-get dist-upgrade

Then you may install packages that complained about dependencies, like sudo apt-get install ia32-libs-multiarch, or sudo apt-get install ia32-libs.

Finally, you should remove the file you just created:

1sudo rm /etc/apt/preferences

because else no new updates would be found.

Reference

  1. http://forum.ubuntuusers.de/topic/paketabhaengigkeit-mit-ia32-libs-kann-nicht-au/2/
  2. http://askubuntu.com/questions/138530/why-do-i-get-an-unmet-dependencies-error-when-trying-to-install-wine