I'm trying to install multiple versions of PostGis and PgRouting in the same instance of PostgreSQL v9.6, using CentOS 7.5.
I've been fighting with dependencies and shared libraries, to make all working.
So the question is, which is the best way to manage de dependencies versions? If I install a major dependency version, old Postgis version still working?
Some dependencies are: GDAL, GEOS, Proj4, etc.
I've been organizing them in folders, with contains subfolders with the version of the dependency, using --prefix=path/v3.0.0 on ./configure script during the depency installation.
Example: Folder -> GEOS - Subfolders: v3.0.0, v3.4.0, etc.
After that, when i want to install any PostGIS version, I use ./configure to use any dependency absolute path.
Example: ./configure --with-pgconfig=path --with-gdal=path/version --with-proj4=path/version ...
But I'm not sure that is a right way.
Any suggestion is welcome to clear my mind.