I'm on Ubuntu, and I want to install Boost. I tried with
sudo apt-get install boost
But there was no such package. What is the best way to install Boost on Ubuntu?
You can check version. hpp inside Boost include dir (normally /usr/include/boost , you can use locate /boost/version. hpp or similar to get that) for BOOST_VERSION or BOOST_LIB_VERSION .
You can use apt-get
command (requires sudo
)
sudo apt-get install libboost-all-dev
Or you can call
aptitude search boost
find packages you need and install them using the apt-get
command.
Get the version of Boost that you require. This is for 1.55 but feel free to change or manually download yourself:
wget -O boost_1_55_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download tar xzvf boost_1_55_0.tar.gz cd boost_1_55_0/
Get the required libraries, main ones are icu
for boost::regex
support:
sudo apt-get update sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev libboost-all-dev
Boost's bootstrap setup:
./bootstrap.sh --prefix=/usr/
Then build it with:
./b2
and eventually install it:
sudo ./b2 install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With