1

I am trying to remove completely Boost 1.71. I need to downgrade to a previous working library as from the version Boost 1.71 I am receiving 'boost::placeholders' has not been declared so I want to downgrade to Boost 1.66.

After typing on the terminal the ldconfig I am left with only one instance:

emanuele@emanuele-pc:~$ ldconfig -p | grep libboost
    libboost_thread.so.1.71.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libboost_thread.so.1.71.0

I tried to remove it using:

sudo rm -f /lib/x86_64-linux-gnu/libboost_*
sudo rm -rf /lib/x86_64-linux-gnu/libboost_*

But still the libboost_thread is there..

So I tried accessing via sudo synaptic and tried to remove it from there but received the following broken package warning:

enter image description here

Therefore thinking that there was something broken I did:

sudo apt-get update --fix-missing
udo apt-get install -f

but nothing...the libboost_thread is still there.

How do I make sure everything is fully removed?

3
  • How was the software installed originally?
    – Nmath
    Jul 17, 2021 at 0:04
  • I don't remember because it was a while ago. It could be that I installed it downloading it from the offical webpage and bootstrapped it
    – Emanuele
    Jul 17, 2021 at 0:14
  • basically I could have followed this source. But again I don't remember fully.
    – Emanuele
    Jul 17, 2021 at 0:15

1 Answer 1

1

Note about using bad methods

Execution of commands like

sudo rm -f /lib/x86_64-linux-gnu/libboost_*
sudo rm -rf /lib/x86_64-linux-gnu/libboost_*

is absolutely wrong. DO NOT DO THIS!
Such library files are controlled by APT, you should ask APT to remove such files first.

If you have compiled these libraries manually, then you did it wrong. They should be placed in the /usr/local/lib prefix. It is not controlled by APT.

Note about 'boost::placeholders'

Really this namespace is used in both Boost 1.67 and 1.71 which are shipped with your Ubuntu 20.04 LTS from official repositories. For successful Boost-based development you then have to install the following development packages:

  • For already installed 1.71 -

    sudo apt-get install libboost1.71-all-dev --reinstall
    
  • For possible 1.67 alternative -

    sudo apt-get install libboost1.67-all-dev
    

Further notes

If you are really understand what are you trying to do then read below.

You can use the following one-liner to remove ALL occurrences of Boost 1.71:

sudo apt autopurge $(dpkg -l | grep boost | grep 1.71 | awk '{print $2}')

To remove only libboost_thread.so.1.71.0 you have to execute:

sudo apt purge libboost-thread1.71.0

if the above command fails, then go lower level and execute as fallback

sudo dpkg --purge --force-all libboost-thread1.71.0

and then run

sudo apt-get install -f
sudo dpkg --configure -a

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.