0

I have a directory in /usr/lib/x86_64-linux-gnu/ There are several files removed from this directory. How can I re-install x86_64-linux-gnu directory? My operating system is ubuntu 16.04.

2
  • Do you mean to say you intentionally or inadverently deleted files from the directory? Jan 13, 2018 at 11:05
  • 1
    The files inside that directory generally belong to lib* packages from the Ubuntu reposity. Try this: sudo apt list --installed | grep '^lib' | cut -d / -f1 | xargs sudo apt install --reinstall Jan 13, 2018 at 11:09

2 Answers 2

2

Find all packages that have changed or missing files with debsums, limit it to those with bad files containing the path /usr/lib/x86_64-linux-gnu/, get the package names, remove duplicates, and reinstall those packages:

sudo apt install debsums
sudo debsums -s 2>&1 | fgrep '/usr/lib/x86_64-linux-gnu/' | awk '{print$6}' | uniq | xargs sudo apt install --reinstall

You may wish to run the second line with xargs echo instead of xargs the first time to check what it's going to reinstall, then run it with just xargs if the package list presented is acceptable.

2
  • 1
    This is good answer, and probably the most correct way and should be accepted as the answer. The other answers and comments won't fix all cases because they assume only certain packages are installed and affected, but this answer will eliminate any guesswork and hone in on the packages that are broken by whatever has happened to the directory. Jan 30, 2019 at 13:49
  • but I think there should be a -y in the section invoking apt ... Jan 30, 2019 at 14:00
-1

I ran into this same issue recently with Ubuntu 16.04.4 LTS server and Samba 4.3.11.

This fixed it for me:

apt-get install --reinstall samba-common smbclient samba-common-bin

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .