0

Problem

I have tried to install Boost version 1.55 (I require this specific version for my programs) using the command:

sudo apt-get install libboost1.55-all-dev

But it keeps giving me the error message:

Reading package lists... Done
Building dependency tree Reading state
information... Done
E: Unable to locate package libboost1.55-all-dev
E: Couldn't find any package by glob 'libboost1.55-all-dev'
E: Couldn't find any package by regex 'libboost1.55-all-dev'

What I have tried

This question suggests to try:

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libboost-all-dev

But, I continue to get the same error.


This question suggests to try:

sudo add-apt-repository ppa:webupd8team/y-ppa-manager    
sudo apt-get update    
sudo apt-get install y-ppa-manager

But, that only gave me the following errors, which I could not find a way around:

The following packages have unmet dependencies:
 y-ppa-manager : Depends: yad (>= 0.36.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

This question suggests to try using apt-file to search for the packages that I require to install it, but nothing shows up when I run the search command.


Question

What are the possible causes & solutions of this issue?

  • The real problem may be this: "I require this specific version for my programs". If you have full control of your (C++) programs, you could build all of them with g++ -static or clang -static on the older system. Statically linked executables are self-contained, so they keep working without issues even when you upgrade your OS / env. Moreover, you could even copy them to a non Ubuntu system (as long as it is Linux with the same architecture) and have them work too. – arielf Feb 14 '17 at 21:18
  • I don't really have full control over my programs, since they are pre-built SDK's form another source. So, that's not really a possibility. – Ryan Feb 15 '17 at 14:18
2

The cause of your problem is the assumption that the Ubuntu repositories are comprehensive and keeps older software.

In fact, Ubuntu is a 'snapshot' distro. During the release process, only the latest stable snapshot of all available software is included. Older versions are not included.

Possible Solutions

1) If the source is available, you can recompile against the current dependencies.

2) Libboost1.55 is available in some older versions of Ubuntu.

$ rmadison libboost1.55-dev
libboost1.55-dev | 1.55.0-1             | trusty/universe | amd64, arm64, armhf, i386, powerpc, ppc64el
libboost1.55-dev | 1.55.0+dfsg-3ubuntu2 | vivid           | amd64, arm64, armhf, i386, powerpc, ppc64el

Your safest, simplest solution is to install Ubuntu 14.04 into a VM to run your software safely without breaking your current system.

Some might suggest an alternative: Downgrading libboost (installing a 14.04 package on a 16.04 system). However, this can be difficult and dangerous for not-advanced users. I have 12 years of experience tinkering with packages and the package manager, and I would not do it.

Returning your system to a working state

Uninstall those packages that you installed during your unsuccessful attempts. Delete those sources. Your attempts have introduced a version conflict (which is what 'held broken packages' means). Your package manager is broken. You cannot install, uninstall, nor update your system (including security updates) until you fix it.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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