Score:0

How to uninstall completely BOOST 1.71

eg flag

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?

Nmath avatar
ng flag
How was the software installed originally?
Emanuele avatar
eg flag
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 avatar
eg flag
basically I could have followed [this source](https://www.boost.org/doc/libs/1_54_0/doc/html/bbv2/installation.html). But again I don't remember fully.
Score:0
zw flag

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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.