Pessoal, bom dia
Estou passando por um problema ao executar o comando "create extension
postgis".
Erro ao executar o create extension:
postgres=# \c gisdb
You are now connected to database "gisdb" as user "postgres".
gisdb=# create extension postgis;
ERROR: could not access file "$libdir/postgis-2.0": Arquivo ou
diretório não encontrado
gisdb=#
Alguém já passou por este problema e tenha conseguido resolver???
Da última vez que isso me aconteceu, era um problema com a compilação do
PostGIS nos repositórios Redhat.
Desde já agradeço a atenção de todos.
Configurações do Servidor e Banco de Dados
===================================
servidor
-----------
CentOS release 6.4 (Final)
banco
--------
Banco: PostgreSQL 9.1.1 on x86_64-unknown-linux-gnu, compiled by gcc
(GCC) 4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit
Esta versão está super desatualizada e cheia de bugs conhecidos.
Atualize já.
postgis isntalado
----------------------
postgres=# SELECT name, default_version,installed_version
postgres-# FROM pg_available_extensions WHERE name LIKE 'postgis%' or
name LIKE 'address%';
name | default_version | installed_version
------------------+-----------------+-------------------
postgis_topology | 2.0.7 |
postgis | 2.0.7 |
(2 rows)
pasta onde estão os arquivos sql do postgis
-----------------------------------------------------------
[root@rjcdsrvv0118 postgis-2.0]# pwd
/usr/pgsql-9.1/share/contrib/postgis-2.0
[root@rjcdsrvv0118 postgis-2.0]# ll
total 5252
-rw-r--r-- 1 postgres postgres 1239 Abr 2 2015 legacy_gist.sql
-rw-r--r-- 1 postgres postgres 2514 Abr 2 2015 legacy_minimal.sql
-rw-r--r-- 1 postgres postgres 54423 Abr 2 2015 legacy.sql
-rw-r--r-- 1 postgres postgres 64582 Abr 2 2015 postgis_comments.sql
-rwxr-xr-x 1 postgres postgres 146957 Abr 2 2015 postgis_restore.pl
<http://postgis_restore.pl>
-rw-r--r-- 1 postgres postgres 194483 Abr 2 2015 postgis.sql
-rw-r--r-- 1 postgres postgres 149552 Abr 2 2015
postgis_upgrade_20_minor.sql
-rw-r--r-- 1 postgres postgres 69411 Abr 2 2015 raster_comments.sql
-rw-r--r-- 1 postgres postgres 5776 Abr 2 2015 rtpostgis_legacy.sql
-rw-r--r-- 1 postgres postgres 186340 Abr 2 2015 rtpostgis.sql
-rw-r--r-- 1 postgres postgres 204855 Abr 2 2015
rtpostgis_upgrade_20_minor.sql
-rw-r--r-- 1 postgres postgres 3593962 Abr 2 2015 spatial_ref_sys.sql
-rw-r--r-- 1 postgres postgres 13756 Abr 2 2015 topology_comments.sql
-rw-r--r-- 1 postgres postgres 271686 Abr 2 2015 topology.sql
-rw-r--r-- 1 postgres postgres 271564 Abr 2 2015
topology_upgrade_20_minor.sql
-rw-r--r-- 1 postgres postgres 14401 Abr 2 2015 uninstall_legacy.sql
-rw-r--r-- 1 postgres postgres 35990 Abr 2 2015 uninstall_postgis.sql
-rw-r--r-- 1 postgres postgres 47073 Abr 2 2015 uninstall_rtpostgis.sql
-rw-r--r-- 1 postgres postgres 10198 Abr 2 2015 uninstall_topology.sql
[root@rjcdsrvv0118 postgis-2.0]#
pasta onde estão as libs do postgis
------------------------------------------------
[root@rjcdsrvv0118 extension]# pwd
/usr/pgsql-9.1/share/extension
[root@rjcdsrvv0118 extension]# ll
total 12928
-rw-r--r-- 1 postgres postgres 1535 Out 7 00:54 adminpack--1.0.sql
-rw-r--r-- 1 postgres postgres 176 Out 7 00:54 adminpack.control
-rw-r--r-- 1 postgres postgres 249 Out 7 00:55 autoinc--1.0.sql
-rw-r--r-- 1 postgres postgres 149 Out 7 00:55 autoinc.control
-rw-r--r-- 1 postgres postgres 250 Out 7 00:55
autoinc--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 24818 Out 7 00:54 btree_gin--1.0.sql
-rw-r--r-- 1 postgres postgres 160 Out 7 00:54 btree_gin.control
-rw-r--r-- 1 postgres postgres 10107 Out 7 00:54
btree_gin--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 37814 Out 7 00:54 btree_gist--1.0.sql
-rw-r--r-- 1 postgres postgres 163 Out 7 00:54 btree_gist.control
-rw-r--r-- 1 postgres postgres 21479 Out 7 00:54
btree_gist--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 1357 Out 7 00:54 chkpass--1.0.sql
-rw-r--r-- 1 postgres postgres 150 Out 7 00:54 chkpass.control
-rw-r--r-- 1 postgres postgres 635 Out 7 00:54
chkpass--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 1028 Out 7 00:54 citext--1.0--1.1.sql
-rw-r--r-- 1 postgres postgres 12341 Out 7 00:54 citext--1.0.sql
-rw-r--r-- 1 postgres postgres 1001 Out 7 00:54 citext--1.1--1.0.sql
-rw-r--r-- 1 postgres postgres 12364 Out 7 00:54 citext--1.1.sql
-rw-r--r-- 1 postgres postgres 158 Out 7 00:54 citext.control
-rw-r--r-- 1 postgres postgres 9781 Out 7 00:54
citext--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 7831 Out 7 00:54 cube--1.0.sql
-rw-r--r-- 1 postgres postgres 142 Out 7 00:54 cube.control
-rw-r--r-- 1 postgres postgres 3195 Out 7 00:54
cube--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 5569 Out 7 00:54 dblink--1.0.sql
-rw-r--r-- 1 postgres postgres 170 Out 7 00:54 dblink.control
-rw-r--r-- 1 postgres postgres 2863 Out 7 00:54
dblink--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 711 Out 7 00:54 dict_int--1.0.sql
-rw-r--r-- 1 postgres postgres 158 Out 7 00:54 dict_int.control
-rw-r--r-- 1 postgres postgres 493 Out 7 00:54
dict_int--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 694 Out 7 00:54 dict_xsyn--1.0.sql
-rw-r--r-- 1 postgres postgres 179 Out 7 00:54 dict_xsyn.control
-rw-r--r-- 1 postgres postgres 488 Out 7 00:54
dict_xsyn--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 3096 Out 7 00:54 earthdistance--1.0.sql
-rw-r--r-- 1 postgres postgres 202 Out 7 00:54 earthdistance.control
-rw-r--r-- 1 postgres postgres 959 Out 7 00:54
earthdistance--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 475 Out 7 00:55 file_fdw--1.0.sql
-rw-r--r-- 1 postgres postgres 155 Out 7 00:54 file_fdw.control
-rw-r--r-- 1 postgres postgres 1436 Out 7 00:55 fuzzystrmatch--1.0.sql
-rw-r--r-- 1 postgres postgres 175 Out 7 00:55 fuzzystrmatch.control
-rw-r--r-- 1 postgres postgres 1108 Out 7 00:55
fuzzystrmatch--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 12402 Out 7 00:55 hstore--1.0.sql
-rw-r--r-- 1 postgres postgres 158 Out 7 00:55 hstore.control
-rw-r--r-- 1 postgres postgres 5509 Out 7 00:55
hstore--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 273 Out 7 00:55 insert_username--1.0.sql
-rw-r--r-- 1 postgres postgres 170 Out 7 00:55 insert_username.control
-rw-r--r-- 1 postgres postgres 282 Out 7 00:55
insert_username--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 1041 Out 7 00:55 intagg--1.0.sql
-rw-r--r-- 1 postgres postgres 119 Out 7 00:55 intagg.control
-rw-r--r-- 1 postgres postgres 468 Out 7 00:55
intagg--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 10473 Out 7 00:55 intarray--1.0.sql
-rw-r--r-- 1 postgres postgres 176 Out 7 00:55 intarray.control
-rw-r--r-- 1 postgres postgres 6771 Out 7 00:55
intarray--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 66287 Out 7 00:55 isn--1.0.sql
-rw-r--r-- 1 postgres postgres 160 Out 7 00:55 isn.control
-rw-r--r-- 1 postgres postgres 23705 Out 7 00:55 isn--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 708 Out 7 00:55 lo--1.0.sql
-rw-r--r-- 1 postgres postgres 126 Out 7 00:55 lo.control
-rw-r--r-- 1 postgres postgres 314 Out 7 00:55 lo--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 18377 Out 7 00:55 ltree--1.0.sql
-rw-r--r-- 1 postgres postgres 155 Out 7 00:55 ltree.control
-rw-r--r-- 1 postgres postgres 7998 Out 7 00:55
ltree--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 261 Out 7 00:55 moddatetime--1.0.sql
-rw-r--r-- 1 postgres postgres 165 Out 7 00:55 moddatetime.control
-rw-r--r-- 1 postgres postgres 266 Out 7 00:55
moddatetime--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 2339 Out 7 00:55 pageinspect--1.0.sql
-rw-r--r-- 1 postgres postgres 173 Out 7 00:55 pageinspect.control
-rw-r--r-- 1 postgres postgres 1116 Out 7 00:55
pageinspect--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 755 Out 7 00:55 pg_buffercache--1.0.sql
-rw-r--r-- 1 postgres postgres 157 Out 7 00:55 pg_buffercache.control
-rw-r--r-- 1 postgres postgres 351 Out 7 00:55
pg_buffercache--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 4814 Out 7 00:55 pgcrypto--1.0.sql
-rw-r--r-- 1 postgres postgres 137 Out 7 00:55 pgcrypto.control
-rw-r--r-- 1 postgres postgres 2449 Out 7 00:55
pgcrypto--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 871 Out 7 00:55 pg_freespacemap--1.0.sql
-rw-r--r-- 1 postgres postgres 160 Out 7 00:55 pg_freespacemap.control
-rw-r--r-- 1 postgres postgres 375 Out 7 00:55
pg_freespacemap--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 534 Out 7 00:55 pgrowlocks--1.0.sql
-rw-r--r-- 1 postgres postgres 152 Out 7 00:55 pgrowlocks.control
-rw-r--r-- 1 postgres postgres 273 Out 7 00:55
pgrowlocks--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 1077 Out 7 00:55
pg_stat_statements--1.0.sql
-rw-r--r-- 1 postgres postgres 191 Out 7 00:55
pg_stat_statements.control
-rw-r--r-- 1 postgres postgres 449 Out 7 00:55
pg_stat_statements--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 1910 Out 7 00:55 pgstattuple--1.0.sql
-rw-r--r-- 1 postgres postgres 147 Out 7 00:55 pgstattuple.control
-rw-r--r-- 1 postgres postgres 457 Out 7 00:55
pgstattuple--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 4997 Out 7 00:55 pg_trgm--1.0.sql
-rw-r--r-- 1 postgres postgres 177 Out 7 00:55 pg_trgm.control
-rw-r--r-- 1 postgres postgres 4246 Out 7 00:55
pg_trgm--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.0--2.0.7.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.0beta4--2.0.7.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.0rc1--2.0.7.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.0rc2--2.0.7.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.1--2.0.7.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.2--2.0.7.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.3--2.0.7.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.4--2.0.7.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.5--2.0.7.sql
-rw-r--r-- 1 postgres postgres 501580 Abr 2 2015
postgis--2.0.6--2.0.7.sql
-rw-r--r-- 1 postgres postgres 4116911 Abr 2 2015 postgis--2.0.7.sql
-rw-r--r-- 1 postgres postgres 185 Abr 2 2015 postgis.control
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.0--2.0.7.sql
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.0beta4--2.0.7.sql
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.0rc1--2.0.7.sql
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.0rc2--2.0.7.sql
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.1--2.0.7.sql
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.2--2.0.7.sql
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.3--2.0.7.sql
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.4--2.0.7.sql
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.5--2.0.7.sql
-rw-r--r-- 1 postgres postgres 290447 Abr 2 2015
postgis_topology--2.0.6--2.0.7.sql
-rw-r--r-- 1 postgres postgres 285522 Abr 2 2015
postgis_topology--2.0.7.sql
-rw-r--r-- 1 postgres postgres 169 Abr 2 2015 postgis_topology.control
-rw-r--r-- 1 postgres postgres 8151 Abr 2 2015
postgis_topology--unpackaged--2.0.7.sql
-rw-r--r-- 1 postgres postgres 78173 Abr 2 2015
postgis--unpackaged--2.0.7.sql
-rw-r--r-- 1 postgres postgres 343 Out 7 00:55 refint--1.0.sql
-rw-r--r-- 1 postgres postgres 169 Out 7 00:55 refint.control
-rw-r--r-- 1 postgres postgres 314 Out 7 00:55
refint--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 7726 Out 7 00:55 seg--1.0.sql
-rw-r--r-- 1 postgres postgres 172 Out 7 00:55 seg.control
-rw-r--r-- 1 postgres postgres 2782 Out 7 00:55 seg--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 1153 Out 7 00:55 sslinfo--1.0.sql
-rw-r--r-- 1 postgres postgres 146 Out 7 00:55 sslinfo.control
-rw-r--r-- 1 postgres postgres 846 Out 7 00:55
sslinfo--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 2153 Out 7 00:55 tablefunc--1.0.sql
-rw-r--r-- 1 postgres postgres 174 Out 7 00:55 tablefunc.control
-rw-r--r-- 1 postgres postgres 1160 Out 7 00:55
tablefunc--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 814 Out 7 00:55 test_parser--1.0.sql
-rw-r--r-- 1 postgres postgres 167 Out 7 00:55 test_parser.control
-rw-r--r-- 1 postgres postgres 575 Out 7 00:55
test_parser--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 486 Out 7 00:55 timetravel--1.0.sql
-rw-r--r-- 1 postgres postgres 156 Out 7 00:55 timetravel.control
-rw-r--r-- 1 postgres postgres 394 Out 7 00:55
timetravel--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 15712 Out 7 00:55 tsearch2--1.0.sql
-rw-r--r-- 1 postgres postgres 313 Out 7 00:55 tsearch2.control
-rw-r--r-- 1 postgres postgres 9106 Out 7 00:55
tsearch2--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 854 Out 7 00:55 unaccent--1.0.sql
-rw-r--r-- 1 postgres postgres 157 Out 7 00:55 unaccent.control
-rw-r--r-- 1 postgres postgres 766 Out 7 00:55
unaccent--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 1376 Out 7 00:55 uuid-ossp--1.0.sql
-rw-r--r-- 1 postgres postgres 163 Out 7 00:55 uuid-ossp.control
-rw-r--r-- 1 postgres postgres 853 Out 7 00:55
uuid-ossp--unpackaged--1.0.sql
-rw-r--r-- 1 postgres postgres 1867 Out 7 00:55 xml2--1.0.sql
-rw-r--r-- 1 postgres postgres 208 Out 7 00:55 xml2.control
-rw-r--r-- 1 postgres postgres 1341 Out 7 00:55
xml2--unpackaged--1.0.sql
[root@rjcdsrvv0118 extension]#
parametro setado no postgres.conf
-----------------------------------------------
#dynamic_library_path = '$libdir'
dynamic_library_path = '/usr/pgsql-9.1/lib'
#local_preload_libraries = '/usr/pgsql-9.1/share/contrib'
variáveis de ambiente
------------------------------
LD_LIBRARY_PATH=/usr/pgsql-9.1/share/contrib
libdir=/usr/pgsql-9.1/share/contrib
PATH=/opt/PostgreSQL/9.1/bin/:/usr/java/jdk1.7.0_79/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/java/jdk1.7.0_79/bin:/usr/java/jdk1.7.0_79/bin:/sbin:/bin:/usr/sbin:/usr/bin
PWD=/usr/pgsql-9.1/share/extension
Atualize os pacotes:
yum upgrade postgresql*
e tente novamente.
[]s
Flavio Gurgel
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral