On Ubuntu 22.04 and ran this to get Boost 1.82:
sudo add-apt-repository ppa:mhier/libboost-latest
sudo apt update
sudo apt install libboost1.82-dev
from asking here: https://stackoverflow.com/a/76543551/1107474
However, unfortunately during the process I received this error:
Unpacking libboost1.82-dev (1.82-0~18~ubuntu22.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libboost1.82-dev_1.82-0~18~ubuntu22.04.1_amd64.deb (--unpack):
trying to overwrite '/usr/include/boost/accumulators/accumulators.hpp', which is also in package libboost1.74-dev:amd64 1.74.0-14ubuntu3
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
I found this similar question:
and followed the advice. It seemed to work. If I look at Version.h
it says #define BOOST_LIB_VERSION "1_82"
However, when I search for 'boost' on my system I have these 1.74 libs but no 1.82.
How do I fix this mess? I have no idea what version of Boost I really have.
If I run sudo apt install libboost1.82-dev
it says:
libboost1.82-dev is already the newest version (1.82-0~18~ubuntu22.04.1).
UPDATE
Just ran:
sudo apt purge libboost1.82-dev
sudo apt install libboost1.82-dev
I do see some 1.82 now:
but I also have same library with 1.74:
Could someone advise how to uninstall all Boost and I will then do a fresh install?
trying to overwrite '/usr/include/boost/accumulators/accumulators.hpp', which is also in package libboost1.74-dev:amd64 1.74.0-14ubuntu3
It's a clear sign that you have already installed the older boost that conflicts with the newer one. Uninstall the older boost
sudo apt purge libboost1.74-dev
sudo apt -f install
This was a bad solution. You got two packages that control the same files. Uninstall libboost1.74-dev
then normally install libboost1.82-dev
.