4

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?

1

Installation of Boost via apt installs several Boost packages which are not uninstalled on the remove that you are using. Try sudo apt-get autoremove which will remove the non-required packages. I tested this on my Ubuntu 12.04.x LTS which successfully removed the non-required Boost packages.

The way you are reinstalling the package might install Boost on your (/home) as opposed to on system (/usr..).

Use the --prefix option of b2 to set the installation location.

Depending on where it installs, at the completion of ./b2, you will see messages like these:

The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

/home/you/boost_1_54_0

The following directory should be added to linker library paths:

/home/you/boost_1_54_0/stage/lib

So, update the LD_LIBRARY_PATH and C_INCLUDE_PATH accordingly for further usages of Boost.

2
  • Thanks Ketan. And after that how do I install BOOST 1.54.0? The way I am doing is correct?
    – arsenal
    Dec 31 '13 at 2:16
  • Yes, see my updated answer.
    – mkc
    Dec 31 '13 at 2:42

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.