Ubuntu – Boost unmet dependencies

dependenciespackage-managementsoftware installation

I heard it is easy to install libraries on Ubuntu so I switched to Ubuntu, I tried to install boost so I write:

sudo apt-get install libboost-all-dev

and I get this:

Reading package lists... Done Building dependency tree        
Reading state information... Done Some packages could not be installed. This
may mean that you have requested an impossible situation or if you are
using the unstable distribution that some required packages have not
yet been created or been moved out of Incoming. The following
information may help to resolve the situation:

The following packages have unmet dependencies:  libboost-all-dev :
Depends: libboost-python-dev but it is not going to be installed E:
Unable to correct problems, you have held broken packages.

Now I see that there is a canonical-question for this
but as the answer suggests:

APT is a package management system for Debian and other Linux
distributions based on it, such as Ubuntu. For the most part,APT is
easy to use for installing, removing, and updating packages. In rare
instances, often when you are mixing in third-party dependencies,
there is a chance that apt-get may end up giving you an error telling
you that a package installation could not be completed.

But I doubt there is anything rare about my situation. In fact the very reason I tried to install boost is because i know it should be a no-brainer, and i wished I would have some success with it before installing openscenegraph, which I will actually need. I wanted to try whether the basic things work, and it has let me down. please help instead of dupe-closing my question against the "general solution" I tried that, but at some point I have no Idea what the answerers are talking about i.e:

Disable/Remove/Purge PPAs:

PPAs (Personal Package Archive) are repositories hosted on Launchpad.
You can use PPAs to install or upgrade packages that are not available
in the official Ubuntu repositories.

One of the most common causes of unmet dependencies are PPAs,
specially when used to upgrade the existing package in Ubuntu
repositories. To solve the problem you have tree options, disable,
purge (revert back to original package in Ubuntu repositories) or
remove PPA.

So my specific question is this:

I have installed Ubuntu 12.04 LTS this very day.
I installed codeblocks, g++, build-essentials, no problem.

I tried to sudo apt-get install openscenegraph, it may have worked although I cannot locate the header files on my hard drive(maybe I should have downloaded the openscenegraph-dev(but it doesn't exist))

So I chose to install boost to see if this package installer works in the first place and I got(unmet dependencies) what I pasted above.

Why it doesn't work and how can I get it to work?


apt-cache madison libboost-python-dev


libboost-python-dev | | http://archive.ubuntu.com/ubuntu/precise/main amd64 Packages

Best Answer

One of the way that problems of unmet dependencies comes is when a dependent application have a its own dependancy that is not going to be installed. Here it is the case.

Problem is libboost-python-dev depends libboost-python1.46-dev. But it was not tried to be installed.


So to install libboost-python-dev, you should install libboost-python1.46-dev also.

So run :

sudo apt-get install libboost-all-dev libboost-python-dev libboost-python1.46-dev

** You can install openscenegraph-dev by :

sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev libopenscenegraph80 libopenthreads-dev libopenscenegraph-dev