Good morning, Collective Intelligence.
I've recently had to resurrect a postgresql-9.1 database by plugging the raw data directory files into a fresh install. All my data is intact, except I can't open up my PostGIS spatial data.
I'm able to enable spatial data on new databases with:
CREATE extension postgis;
However, trying to access data in the recovered spatial databases results in an error.
For example,
SELECT PostGIS_full_version();
throws an error:
ERROR: could not access file "$libdir/postgis-2.0": No such file or directory
SQL state: 58P01
Context: SQL statement "SELECT postgis_lib_version()"
PL/pgSQL function "postgis_full_version" line 17 at SQL statement
I've seen this post on the topic, but there's not enough information to solve my problem.
ERROR: could not access file "$libdir/postgis-2.0" postgresapp
This is my PostGIS version:
POSTGIS="2.1.0SVN" GEOS="3.4.1-CAPI-1.8.0 r3892" PROJ="Rel. 4.7.1, 23 September 2009" GDAL="GDAL 1.7.3, released 2010/11/10" LIBXML="2.7.8" LIBJSON="UNKNOWN" (core procs from "2.1.0SVN" need upgrade) RASTER (raster procs from "2.1.0SVN" need upgrade)
I'm assuming this is a path variable I need to reset somehow, though I'm not sure how to access it.
Appreciate very much your tips.
Forgot to say: I did check the setting in the pg_config file for the libdir. It's set to usr/lib/postgresql/9.1/lib which is working properly for new databases that I enable. Is there a way to check the setting on the old data? How would it be different? Thx.
I installed it 2.1.0SVN a while and resolved the issue without downgrading http://www.lontongcorp.com/?p=783
Basically you need to link
sudo ln -s /usr/lib/postgresql/9.2/lib/postgis-2.1.so /usr/lib/postgresql/9.2/lib/postgis-2.0
sudo ldconfig
SOLVED: Some more rooting around led me to the extensions on my PostGIS databases, which I couldn't update to 2.1.0SVN. Re-installing to PostGIS 2.0.3 solved the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With