what is the difference between different 'lib' folder in ubuntu [duplicate]
Solution 1:
/lib
contain "essential" libraries that may be needed even in single-user (admin-only) mode and without /usr
mounted
/usr/lib
are the libraries for the normal user-programs, that mostly can be found under /usr
.
/usr/local/lib
are the libraries for locally installed programs and packages ie. things you've compiled and installed from source-packages yourself.
In addition to shared and static libraries which are the lib-directories main purpose, you may also find some hierarchies (with their own lib, bin, include and so on) for some larger packages under them.
lib32
and lib64
are used on 64-bits systems to separate libraries for 32-and 64-bits.