The Boost C++ libraries are a set of free peer-reviewed C++ libraries. They are intended to be useful for a wide variety of applications and portable. Boost just makes life easier, here is how to install it on Linux.
The easiest way to install Boost is with your built-in package manager. It takes care of the installation of all of the dependencies and is more likely to be using a very stable version of the library. Also, there is the added benefit of it being easy to remove if you no longer want it.
On most Debian based systems, you can install all of the Boost libraries with a single command.
apt-get install libboost-all-dev
The newer versions of Fedora now use Dandified Yum, instead of just regular yum.
dnf install boost-devel
yum install boost-devel
If you require a different version of it than the one that is provided by your package manager, you can easily compile and install it manually.
Boost has very few dependencies. You mainly need just a C++ compiler and make.
With that out of the way, let’s get to the installation, do keep in mind that you will need to set the change the first few environment variables to what you would like them to be.
export MAJOR_VERSION=1 export MINOR_VERSION=70 export PATCH_VERSION=0 wget https://dl.bintray.com/boostorg/release/${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}/source/boost_${MAJOR_VERSION}_${MINOR_VERSION}_${PATCH_VERSION}.tar.gz tar -xzf boost_${MAJOR_VERSION}_${MINOR_VERSION}_${PATCH_VERSION}.tar.gz cd boost_${MAJOR_VERSION}_${MINOR_VERSION}_${PATCH_VERSION} ./bootstrap.sh ./b2 install -j$(nproc)
You should now have successfully installed Boost on your machine. For more details, I suggest taking a look at the official boost documentation
Mockery is an awesome tool that offers the ability to generate mocks from Go interfaces.…
Testify is a testing library that makes writing tests for your Go code easy. It…
Certmagic is a Golang library which allows to user to easily and automatically setup HTTPS…
Often times you will need to increase the maximum number of file descriptors in order…
Served is a C++ library for easy creation of highly performant web servers. It presents…
This website uses cookies.