In this article, we will see how to solve config error: Boost is not available! . Many times it has been observed that while installing a package from its source code, it always complains about some missing libraries which needs to be preinstalled to complete the compilation and then the installation process. This issue of missing libraries can be caught during configuration phase itself when you are running ./configure to check all the required configuration is in place.
One of that very common missing library is the Boost C++ Libraries development files. A lot of package requires this library to be preinstalled. Hence before solving this error, I though to write an article about this so that it will help you guys also.
[Solved]: configure: error: Boost is not available! in Linux
Like most of the people, I also encountered
"config error: Boost is not available" during running of the
./configure while installing a package on Ubuntu 20.04 LTS System as you can see below. You might have encountered this error in some other Linux based systems.
rootuser to run all the below commands. You can use any user with
sudoaccess to run all these commands. For more information Please check Step by Step: How to Add User to Sudoers to provide
sudoaccess to the User.
root@cyberithub:~# ./configure .......................................... checking for miniupnpc/upnpcommands.h... no checking miniupnpc/upnperrors.h usability... no checking miniupnpc/upnperrors.h presence... no checking for miniupnpc/upnperrors.h... no checking natpmp.h usability... no checking natpmp.h presence... no checking for natpmp.h... no checking for boostlib >= 1.64.0 (106400)... configure: We could not detect the boost libraries (version 1.64.0 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation. configure: error: Boost is not available!
While this error can come due to any local reasons but most of the time it is because of missing Boost C++ Libraries in your System. So to solve this error on Ubuntu/Debian based systems, all you need to do is to install Boost Library by using
apt-get install libboost-all-dev command as shown below. That's it !!
root@cyberithub:~# apt-get install libboost-all-dev Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: cpp-8 gcc-8 gcc-8-base gfortran gfortran-8 gfortran-9 ibverbs-providers icu-devtools libboost-atomic-dev libboost-atomic1.71-dev libboost-atomic1.71.0 libboost-chrono-dev libboost-chrono1.71-dev libboost-chrono1.71.0 libboost-container-dev libboost-container1.71-dev libboost-container1.71.0 libboost-context-dev libboost-context1.71-dev libboost-context1.71.0 libboost-coroutine-dev libboost-coroutine1.71-dev libboost-coroutine1.71.0 libboost-date-time-dev libboost-date-time1.71-dev libboost-dev libboost-exception-dev libboost-exception1.71-dev libboost-fiber-dev libboost-fiber1.71-dev libboost-fiber1.71.0 libboost-filesystem-dev libboost-filesystem1.71-dev libboost-graph-dev libboost-graph-parallel-dev libboost-graph-parallel1.71-dev libboost-graph-parallel1.71.0 libboost-graph1.71-dev libboost-graph1.71.0 libboost-iostreams-dev libboost-iostreams1.71-dev libboost-locale-dev libboost-locale1.71-dev libboost-log-dev libboost-log1.71-dev libboost-log1.71.0 libboost-math-dev libboost-math1.71-dev libboost-math1.71.0 libboost-mpi-dev libboost-mpi-python-dev libboost-mpi-python1.71-dev libboost-mpi-python1.71.0 libboost-mpi1.71-dev libboost-mpi1.71.0 libboost-numpy-dev libboost-numpy1.71-dev libboost-numpy1.71.0 libboost-program-options-dev libboost-program-options1.71-dev libboost-program-options1.71.0 libboost-python-dev libboost-python1.71-dev libboost-python1.71.0 libboost-random-dev libboost-random1.71-dev libboost-random1.71.0 libboost-regex-dev libboost-regex1.71-dev libboost-regex1.71.0 libboost-serialization-dev libboost-serialization1.71-dev libboost-serialization1.71.0 libboost-stacktrace-dev libboost-stacktrace1.71-dev libboost-stacktrace1.71.0 libboost-system-dev libboost-system1.71-dev libboost-system1.71.0 libboost-test-dev libboost-test1.71-dev libboost-test1.71.0 libboost-thread-dev libboost-thread1.71-dev libboost-timer-dev libboost-timer1.71-dev libboost-timer1.71.0 libboost-tools-dev libboost-type-erasure-dev libboost-type-erasure1.71-dev libboost-type-erasure1.71.0 libboost-wave-dev libboost-wave1.71-dev libboost-wave1.71.0 libboost1.71-dev libboost1.71-tools-dev libcaf-openmpi-3 libcoarrays-dev libcoarrays-openmpi-dev libevent-core-2.1-7 libevent-dev libevent-extra-2.1-7 libevent-openssl-2.1-7 libevent-pthreads-2.1-7 libexpat1-dev libfabric1 libgcc-8-dev libgfortran-8-dev libgfortran-9-dev libgfortran5 libhwloc-dev libhwloc-plugins libhwloc15 libibverbs-dev libibverbs1 libicu-dev libmpx2 libnl-3-dev libnl-route-3-dev libnuma-dev libopenmpi-dev libopenmpi3 libpmix2 libpsm-infinipath1 libpsm2-2 libpython3-dev libpython3.8-dev librdmacm1 libxnvctrl0 mpi-default-bin mpi-default-dev openmpi-bin openmpi-common python3-dev python3-distutils python3.8-dev zlib1g-dev
If you are facing this error in RHEL/CentOS based systems, then to solve this error you need to first install the
epel-release package by using
yum install epel-release command and then install the Boost Library by using
yum install boost boost-thread boost-devel command.
Once the library is successfully installed, you can again start running
./configure and now you will notice that boost library is showing as installed and status as ok. You can check more about Boost Library on its official website.