You can use
ldconfig to find libraries and their respective version numbers. Something like this should work:
ldconfig -v | grep [Library Name]
If needed run it as root(sudo). Substitute [Library Name] with whatever library you want to look for such as: libgeos/geos/gdal/etc. Alternatively
ldconfig -v | more and searching through will give you information on all libraries.
This should give you the list of all versions of that specific library. Please read over the ldconfig manpage to get more information.
You can also use the tools built into
R to figure this out. This page from the R manual give a lot of details on how to list out installed packages associated with
R. From my limited understanding you should be able to, in an
R console, run the following to figure out installed libraries:
installed.packages(lib.loc = NULL, priority = NULL,
noCache = FALSE, fields = NULL,
subarch = .Platform$r_arch, ...)