Ubuntu 12.04,PostgreSQL-9.1-无法访问$ libdir/postgis-2.0 [英] Ubuntu 12.04, PostgreSQL-9.1 - Can't access $libdir/postgis-2.0

查看:616
本文介绍了Ubuntu 12.04,PostgreSQL-9.1-无法访问$ libdir/postgis-2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,集体智慧.

我最近不得不通过将原始数据目录文件插入全新安装中来恢复postgresql-9.1数据库.除了无法打开PostGIS空间数据外,我所有的数据都是完整的.

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.

例如,

SELECT PostGIS_full_version();

引发错误:

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.

错误:无法访问文件"$ libdir/postgis-2.0"; postgresapp

这是我的PostGIS版本:

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.

非常感谢您的提示.

忘了说:我确实检查了pg_config文件中libdir的设置.它设置为usr/lib/postgresql/9.1/lib,它对于我启用的新数据库正常工作.有没有办法检查旧数据的设置?会有什么不同?谢谢.

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.

推荐答案

已解决:更多的扎根使我想到了PostGIS数据库的扩展,无法将其更新为2.1.0SVN.重新安装到PostGIS 2.0.3可以解决此问题.

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.

这篇关于Ubuntu 12.04,PostgreSQL-9.1-无法访问$ libdir/postgis-2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆