How to add compiler include paths and linker library paths for newly installed Boost?

There are always three steps to install software on Linux systems:

  1. configure — "check"
  2. make — "build software in current directory"
  3. make install — "copy files to the systems so the other software can use this software"

You likely did the equivalent of make but did not do the equivalent of make install. You need to run

sudo ./b2 install

after running ./b2


Just add the paths to your .bashrc or .profile (or whatever floats your boat) like this:

export LIBS="-L/home/dfe/Archive/boost_1_44_0/stage/lib"
export CPPFLAGS="-I/home/dfe/Archive/boost_1_44_0"

First, I removed the existing boost rpm using

rpm -e boost-1.33.1-10.el5

A message is displayed saying "error: "boost" specifies multiple packages"

Then tried:

rpm -e --allmatches boost

(I don't remember whether I typed 'boost' or 'boost-1.33.1-10.el5')

The packages with dependencies were shown. I did:

rpm -e [packagename1]
rpm -e [packagename2]

and so on and then did:

rpm -e --allmatches

This erased boost completely from my system.

Then I extracted boost_1_44_0.tar.bz2 using tar -xvjf boost_1_44_0.tar.bz2 and ran bootstrap with:

./bootstrap.sh

Then ran bjam as:

./bjam install

That's it! Boost got installed on my system, and I didn't have to specify any of the linker options while compiling programs! Yay! Now the 'rpm -q boost' command shows that there is no package installed.