What is the best method in bash to check to se if a c library is installed?
Per comments, to be more clear:
I run an install script that looks for the libexpat header file (expat.h)
Currently it is doing this via:
if ! locate libexpat.so 1> /dev/null; then
However, it should be looking for expat.h, but this still required the mlocate db to be updated first.
Any better way?
The best one I found was with @cnicutar’s comment, thanks.
Specifically to do this in a bash script: