4

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:

https://askubuntu.com/questions/1062171/dpkg-deb-error-paste-subprocess-was-killed-by-signal-broken-pipe

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:

enter image description here

but I also have same library with 1.74:

enter image description here

Could someone advise how to uninstall all Boost and I will then do a fresh install?

intrigued_66
  • 16,082
  • 51
  • 118
  • 189

1 Answers1

2
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.

273K
  • 29,503
  • 10
  • 41
  • 64
  • Okay, done that. However, I still have 1.74 libs like `/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0` – intrigued_66 Jun 24 '23 at 18:24
  • This is not an issue, your app will link `libboost_regex.so --> libboost_regex.so.1.82.0` – 273K Jun 24 '23 at 18:29
  • @intrigued_66 Those are the runtime libraries, you'd have to uninstall the runtime packages but they may be required by other applications – Alan Birtles Jun 25 '23 at 05:40