Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130279 - Postgis: Wrong path for library--error during import of shapefile
Summary: Postgis: Wrong path for library--error during import of shapefile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Sci-geo Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-17 10:58 UTC by webb.sprague
Modified: 2007-01-07 13:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description webb.sprague 2006-04-17 10:58:51 UTC
I am trying to import a shapefile using shp2psql.  I can create the table fine (with the command line: "shp2pgsql -p tgr06011blk00.shp foo |  psql -d poolp"), but when I try to import the data I get the following in my import log (with the command line: ("shp2pgsql -a tgr06011blk00.shp foo | psql -d poolp 2>log")

webbs@cowboy ~/colusa_shapes/blk0006011 $ head log
ERROR:  could not access file "/usr/libexec/liblwgeom.so.1.1": No such file or directory
ERROR:  current transaction is aborted, commands ignored until end of transaction block
(etc, etc)

However, liblwgeom is installed, just here:

webbs@cowboy ~/colusa_shapes/blk0006011 $ locate liblwgeom
/usr/lib/postgresql/liblwgeom.so.1.1
/usr/lib/postgresql/liblwgeom.so
/usr/lib/postgresql/liblwgeom.so.1

I am not sure if this is a problem in postgis or what, or maybe it would just be fixed with the next emerge, but it seems to me like a bug in something.
 
Here is my emerge info:

webbs@cowboy /var/www/localhost/htdocs/larry $ emerge info
*** Deprecated use of action 'info', use '--info' instead
Portage 2.1_pre7-r5 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.6-r3, 2.6.11-gentoo-r9 i686)
=================================================================
System uname: 2.6.11-gentoo-r9 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.12.0_pre17
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS=" -march=athlon -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS=" -march=athlon -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts blas crypt cups dba dri eds emacs emboss encode f77 fftw foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde libg++ libwww mad mikmod mime mmap motif mp3 mpeg ncurses nls objc ogg oggvorbis opengl oss pam pdflib perl png postgres pppd python qt quicktime readline sdl spell ssl svg tcltk tcpd tidy truetype truetype-fonts type1-fonts unicode vorbis xml2 xmms xv zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 FENOY Gérald (RETIRED) gentoo-dev 2006-04-22 05:36:09 UTC
Hi, it seems that your installation was wrong. 
This could be caused by an old version of postgis you've allready installed and loaded in your database. Indeed when you upgrade the postgis library, you must also upgrade the objetcs/functions definitions in your database to ensure that the new objects/functions definitions are the right one and the path for libraries was correct too (so if you didn't do the upgrade correctly, postgresql could search for the old library version which was located in /usr/libexec/). If it's the case then you just need to upgrade your database as discribed here : http://postgis.refractions.net/docs/ch02.html#upgrading, you could find the relevant lwpostgis_upgrade.sql file in the /usr/share/postgresql/contrib directory.

I would like to know which version of the postgis ebuild did you use. But you could make some tests before answering. Indeed you could find the library used by your database with this SQL query : "select proname, probin from pg_proc WHERE probin like '%lwgeom%';". You could also try to create a new database, importing the right lwpostgis.sql objects/functions definitions file (which is located in /usr/share/postgresql/contrib/) and then retry to import your data with shp2pgsql. If this fails, then there is a problem in the ebuild version you've used. You could also take a look at the lwpostgis.sql file itself to see if it refers to the right path for the lwgeom library.

Thanks in advance to give us this iformations.

ps: sorry for my late answer, I was in trip this week.
Comment 2 FENOY Gérald (RETIRED) gentoo-dev 2007-01-07 13:43:39 UTC
This is fixed with the new ebuilds serie of postgis (version 1.1.6 and 1.2.0).
To solve this kind of issue, you should load the load_before_upgrade.sql file into your database before loading lwpostgis_upgrade.sql.