Accidentally overwrote /usr/lib/x86_64-linux-gnu(using mv command) with file

While trying to move a file into /usr/lib/x86_64-linux-gnu, I accidentally overwrote x86_64-linux-gnu itself. The system(ArchLinux) is still running, but I’m not sure how to safely recover x86_64-linux-gnu, what exactly/how important it is, or what will happen if the system reboots. How can I fix/recover x86_64-linux-gnu, and anything else that might have happened with the system?

edit:
The command that accidentally overwrote x86_64-linux-gnu, is mv /usr/lib/liblatencyflex_layer.so /usr/lib/x86_64-linux-gnu, the intended command was mv /usr/lib/liblatencyflex_layer.so /usr/lib/x86_64-linux-gnu/ (first I had accidentally moved into /usr/lib/ instead of /usr/lib/x86_64-linux-gnu/). I’m trying to do a manual install of program that needs a liblatencyflex_layer.so file in x86_64-linux-gnu.

edit2: Apparently /usr/lib/x86_64-linux-gnu is a Debian directory not ArchLinux, and I was following the wrong tutorial; more info in the comments below twelfth’s answer.

Asked By: Shringe_

||

what exactly… it is

Please see here for further information, as this answer explains that quite well.

Arch Linux users, please ignore the above link, which pertains to the Debian or Ubuntu handling of multiarch. For Arch handling of this, please see the Arch wiki file hierarchy.

How can I fix/recover x86_64-linux-gnu, and anything else that might have happened with the system?

There is nothing to fix. The directory does not ordinarily exist in Arch installations. Please check when manually installing whether the instructions pertain to your distribution, as differences can arise.

Assuming you did, for some reason, have the /usr/lib/x86_64-linux-gnu/ directory in your Arch installation, execute the following.

Please back up your data before running the second command.

Open a terminal and try running:

# pacman -Qk

See here and here for further explanation of the command above. This locates missing files. Then, with the results from that copied, paste them as follows:

# pacman -Syu [INSERT RESULTS FROM ABOVE]

See here for further explanation of the command above.

Answered By: twelfth
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.