10

I have a boost 1.49 in my ubuntu system. And I am trying to uninstall boost 1.49 and completely remove it from my system.

And after that install the Boost 1.54.0

I did like this to uninstall 1.49 from my system -

sudo apt-get --purge remove libboost-dev
sudo apt-get --purge remove libboost-all-dev

And after that when I do below command to see the version, it still says I have 1.49

cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION"
//  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
#define BOOST_LIB_VERSION "1_49"

Not sure why?

And I tried installing Boost 1.54.0 version like this -

wget http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download
tar -xvzf boost_1_54_0.tar.gz
cd boost_1_54_0/
./bootstrap.sh --with-libraries=atomic,date_time,exception,filesystem,iostreams,locale,program_options,regex,signals,system,test,thread,timer,log
sudo ./b2 install

But still it is not showing me boost 1.54.0 version installed?

Any pointers how to remove BOOST 1.49 from my system and install BOOST 1.54 in my machine?

2
  • Why do you need to remove boost 1.49. I myself don't care which parts comes already preinstalled to the distribution because of some system dependency. For compiling my stuff, I just use the boost I've installed to /usr/local, not /usr. Tip-of-trunk, It just works.
    – oblitum
    Dec 31, 2013 at 1:54
  • It's better for the health of the system, to let it with its maintained dependencies. Your developing stuff, you use from /usr/local or /opt. You compile against this stuff, problem solved.
    – oblitum
    Dec 31, 2013 at 1:58

1 Answer 1

20

You need to uninstall the libboost1.49-dev package... actually, it should be removed with a single sudo apt-get autoremove. If you are not sure do this:

dpkg -S /usr/include/boost/version.hpp

This will return the package that has this file, then you can:

sudo apt-get autoremove package
6
  • Thanks.. Let me try that.. And after uninstalling, I can follow same steps for installing BOOST 1.54.0 that I have in my question. Correct?
    – arsenal
    Dec 31, 2013 at 1:57
  • you might want to install Saucy instead that has the library already installed instead of building it yourself.
    – Braiam
    Dec 31, 2013 at 1:59
  • I am not sure I understand that.. Sorry about, I don't have that much background with c++ stuff and linux.. Can you tell me step by step if possible? :(
    – arsenal
    Dec 31, 2013 at 2:00
  • I was able to remove it successfully as after running your command and if I do dpkg -S /usr/include/boost/version.hpp, it doesn't show me anything on the console.. And I tried installing it with the way I have in my question and after that, if I run your command again dpkg -S /usr/include/boost/version.hpp then I don't see anything on my console again?
    – arsenal
    Dec 31, 2013 at 2:04
  • If you don't install it using apt/dpkg, they will know nothing about it. For that reason I told you that instead of building/installing it yourself is better to upgrade to Saucy.
    – Braiam
    Dec 31, 2013 at 2:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .