Static Libraries by default live in /usr/lib
or /usr/lib64
but I deleted all of them in my OS with this command:
find / -name *.a -exec rm -rf {} \;
My linux is already OK and everything works good!
Can we say?
" Package.rpm or *.deb contain compiler outputs, only they need shared libraries.
And when we install software from source code,if in the structure use static library,linker in during compile,Copy static libraries to it's executable file.
Without *.a
files in my system, maybe in future if i would install software from source code , i will face problems "
Please explain it to me in a simple way
Static libraries are libraries used by binaries at compilation time. They are usually not used again in the runtime as they are linked with the compiled binary at the compilation time and become part of the binary itself.
Also, in implementation, these are not shared among binaries, only the binary that is compiled with specific static library(ies), uses that(those). So in application, these are the quite opposite to the statically linked libraries.
Note that, the static libraries end in
.a
while the dynamic libraries end in.so
.Static libraries are binary independent packages of compiled source code that you "import" in your application when build it in a static manner.
Really, a program called linker, carry out a sort of "copy and paste" of their compiled code along with your compiled source code (it is a bit more complex but this explanation can be go well for respond to your request... ).
Then, the message that you have reported in the OP, says in synthesis that removing static libraries from the directory "lib" doesn't generate problems to the installed programs, because, as said, they are already "pasted" in the binaries of installed programs, and that can happen in Linux because its programs are generally distributed directely by their uncompiled source code, and so they need a compilation step, that generally it is done through with rpm or others linux packages/setup managers.
Instead, as always the posted message says, if you install new programs, then installation could fail, if they need of removed libs, because when compiling, linker won't find needed (referenced) static libs.
I hope it is clear, sorry for my bad English..