7

I have updated my system to 16.04 and installed a load of updates.

I have had version 1.54 of boost libraries on my computer since November 2013. Today I rebuilt some code and it could no longer find the boost regex library.

So I have tried updating to the latest version, but keep getting this error:

sudo apt-get install libboost-all-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libboost-all-dev

It does appear that it should be in the repository. I did not install boost this way originally but went to their own site and probably built it with some "wget" command. (I may try doing that and get their latest version which is 1.61, whereas the packaged version here is 1.58).

Still, I want to know why the above will not work.

Note: sudo aptitude install libboost gives me the following feedback:

> Couldn't find package "libboost".  However, the following packages
> contain "libboost" in their name:   libboost1.58-tools-dev
> libboost1.58-tools-dev:i386 libboost-program-options1.58.0
> libboost-program-options1.58.0:i386 libboost1.58-dbg   
> libboost1.58-dbg:i386 libboost1.58-dev libboost1.58-dev:i386
> libboost1.58-doc libboost-date-time1.53.0 libboost1.54-doc   
> libboost-filesystem1.58.0 libboost-filesystem1.58.0:i386
> libboost-date-time1.54.0 libboost-system1.53.0 libboost-system1.54.0  
> libboost-date-time1.58.0 libboost-date-time1.58.0:i386
> libboost-thread1.58.0 libboost-thread1.58.0:i386 libboost-system1.58.0
> libboost-system1.58.0:i386 libboost-random1.58.0
> libboost-random1.58.0:i386 libboost-dbg libboost-dbg:i386 libboost-dev
> libboost-dev:i386    libboost-doc libboost-program-options-dev
> libboost-program-options-dev:i386 libboost-date-time1.49.0
> libboost-iostreams1.53.0    libboost-iostreams1.54.0
> libboost-iostreams1.58.0 libboost-iostreams1.58.0:i386
> libboost-regex1.58.0 libboost-regex1.58.0:i386   
> libboost-program-options1.58-dev libboost-program-options1.58-dev:i386
> No packages will be installed, upgraded, or removed. 0 packages
> upgraded, 0 newly installed, 0 to remove and 54 not upgraded.

I did sudo add-apt-repository universe but it still could not find the package.

I was able to install the libraries one-at-a-time, but still question why it is not there when this page suggests it is.

  • Did you enable the "universe" repository? – edwinksl Aug 3 '16 at 10:07
7

Try adding the repository (http://packages.ubuntu.com/search?keywords=libboost-all-dev)

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libboost-all-dev
| improve this answer | |
  • 3
    I tried add-apt-repository universe but it still did not find the package. – CashCow Aug 3 '16 at 14:08
1

Another sudo apt-get update and then it worked.

Possibly that update needs to come after add-apt-repository universe.

| improve this answer | |
  • 1
    Yes, whenever you change the repositories by adding a PPA, you need to run sudo apt-get update. The "update" is exactly that, of looking at all the list of repositories, old and newly added. – user308164 Aug 4 '16 at 8:07
  • 1
    No it is not the problem – Alireza Sanaee Dec 23 '16 at 12:28
0

I got similar error, this worked for me:

sudo apt --fix-broken install

After that I was able to install the libraries and everything worked.

| improve this answer | |

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.