I have just upgraded my server to ubuntu 20.04 LTS.
I am now trying to various different code packages on it and receiving errors relating to the boost installation.
Rather than building from source, I have installed boost 1.71.0 using apt:
sudo apt-get install libboost-all-dev
However, when I try and compile code I am getting errors such as:
fatal error: boost/algorithm/string/trim.hpp: No such file or directory
15 | #include <boost/algorithm/string/trim.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
boost/log/sinks/text_ostream_backend.hpp: No such file or directory
6 | #include <boost/log/sinks/text_ostream_backend.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have spent the last 3 hours trying to find those hpp files with no success. There is nothing in:
/usr/local/include/
/usr/local/lib/
/usr/lib/
/usr/include/boost *doesn't exist*
Any idea what could be wrong? I'm trying to avoid installing boost from source, rather than the Ubuntu package but do I have to?
Managed to resolve the issue.
Turns out that because I had a previous boost installation from a manual installation (before I upgraded to 20.04 LTS) and had deleted those files manually, further re-installs via apt were not recreating the files in usr/include/
, due to other packages relating to boost still installed in the system.
The recovery was to run apt list --installed '*boost*'
and then uninstall any of those linked packages.
After doing that running sudo apt install libboost-all-dev
recreated the /usr/include/boost directory with all the header files.
This process was listed in the answer on: https://askubuntu.com/questions/1161393/i-deleted-usr-include-boost-installing-libboost-all-dev-wont-bring-headers-ba