How can I get back
/usr/local/lib? I accidentally deleted it.
sudo rm -Rf lib inside
I am using 12.04.
The standard use of
Assuming this is the way the folder was used, you can simply reinstall the software that provided the library files.
Most of the time, software is built something like this:
Those commands are run from inside the particular program's source directory, which is typically a subdirectory of
So, just go back there (for each program or library installed, as even applications may provide files stored in
If you had run
If you didn't keep the source code at all, you'll have to redownload it, unpack it, and install it, as you had done before.
Even in the worst case scenario where you are not sure what programs you had installed from source, it's still usually much easier to figure that out than to use generic file recovery methods. Such methods are usually difficult and time consuming and only give you back part of what you had hoped to recover; the libraries in