I am trying to add PostGIS functionality to a database that I created in PostgreSQL using the following command: psql -d <db_name> -f /location/to/this/file/postgis.sql
However, I receive a bunch of errors relating to 'geometry does not exist', but on line 1 of these error messages, it says ERROR: could not access file “$libdir/postgis-1.5”
.
I Google'd and checked StackOverflow, and it seems like this error is related to dependencies or scripts not being installed. I installed PostGIS using yum install postgis84
. I did not see any dependencies except for proj
. Based on these instructions, it seems like I will need Proj4, GEOS, LibXML2, GDAL, JSON-C, etc.
Is there a repository that I can connect to that will let me install PostGIS with all the crucial dependencies rather than installing them one by one? I am running a Red Hat Enterprise Linux 6.5 server on Amazon EC2.