6

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?

Edit:

apt-cache madison libboost-python-dev

returns:

libboost-python-dev |   1.48.0.2 | http://archive.ubuntu.com/ubuntu/precise/main amd64 Packages
  • Can you give the result of apt-cache madison libboost-python-dev? – user224082 Dec 27 '13 at 15:29
  • I edited to address your inquiry – Jani Kovacs Dec 27 '13 at 15:37
  • Have you used a repository (PPA) to install libboost-all-dev? – user224082 Dec 27 '13 at 15:37
  • no I didn't. should I have done so? I feel it is not in reach of my current ubuntu knowledge. – Jani Kovacs Dec 27 '13 at 15:41
  • No. Try with sudo apt-get remove libboost-python-dev. If it is going to remove sevaral other packages, stop the process ( dont do it). If it says that it is not installed, it doesn't matter. Then run sudo apt-get install libboost-all-dev libboost-python-dev libboost-python1.46-dev – user224082 Dec 27 '13 at 15:47
0

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.

packages.ubuntu.com.

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 
2
sudo aptitude install libboost-all-dev

Using aptitude instead of apt-get may offer you some automatic solutions for removing conflicting packages.

  • 1
    amazing, I thought I'm going to throw my laptop over the window and finally found this. Thanks a lot – Pawel Cioch Jan 16 '18 at 16:55
0

I just ran into this problem myself. I had 'libboost1.48-dev' installed, which is similar to your case, where you have 'libboost1.48-python-dev'.

  • You want to install libboost1.48-all-dev, not libboost-all-dev. The latter is version 1.46, which is incompatible with your already installed libboost1.48-python-dev.

  • Alternately, you can un-install libboost1.48-python-dev and install libboost-all-dev if you want to step back to v1.46.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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