After playing around with manually installed boost versions to meet software dependencies, I did something stupid: I deleted by system boost libraries (the .so files) from /usr/lib/x86_64-linux.gnu/ . I have tried to remove and reinstall the libboost-all-dev package. I did not get error essages, but the library files were not restored. I have downloaded all the .deb files and installed them manually with dpkg, without success. How can I repair my system and recover the files?

| improve this question | | | | |
  • Are you asking how to determine exactly which package provides a specific file? – user535733 Jul 7 '18 at 13:10
  • @user535733 I do not know what causes this, so if the files do not come with libboost-all-dev then yes, I'd like to know which other package provides the files. However, that seems implausible. I am facing a severely broken system, I don't want to setup anew, so all help is highly appreciated. The main question is why apt --reinstall install does not solve my problem. – tglas Jul 7 '18 at 15:58
  • Please edit your question to include the missing filenames, including full paths, from the error messages. – user535733 Jul 7 '18 at 16:03

You should check which Boost-related packages do you have installed.

For example with dpkg -l | grep boost and then reinstall all of them with

sudo apt-get install --reinstall \
$(dpkg -l | grep ^ii.*boost | awk '{print $2}')
| improve this answer | | | | |
  • 1
    @Norbert Thank you so much, this one worked for me! You really saved my day! – tglas Jul 7 '18 at 16:15

Try to reinstall the package libboost-all-dev along with its dependencies. You can find packages which libboost-all-dev depends on using the following command in terminal

sudo apt-cache depends libboost-all-dev

Then reinstall all of them

sudo apt install --reinstall libboost-all-dev <list_of_dependencies>

Or use two all-in-one commands (try both of them):

sudo apt-cache depends libboost-all-dev | grep '[ |](Depends): [^:]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt --reinstall install -y


sudo apt-cache depends libboost-all-dev | grep '[ |]Depends: [^:]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt --reinstall install -y
| improve this answer | | | | |
  • Thanks for the quick reply. This is pretty much along the lines of what I tried already. I got the list, the command apparently did something, but the files are not restored. Any idea how to debug this situation? – tglas Jul 7 '18 at 8:23
  • Thanks, I tried both. The first did nothing, the second one did essentially the same as my attempt with the manually compiled dependency list - it loaded some stuff, but the libs did not come back. I worked around the problem in the meantime by compiling boost manually, putting the files in place, and creating a ton of symlinks by hand. However, I'd still like to understand what goes wrong... – tglas Jul 7 '18 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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