pramsey / pgsql-postal

PostgreSQL binding for libpostal
MIT License
138 stars 20 forks source link

Problems with Install on Ubuntu #9

Closed EvanCarroll closed 7 years ago

EvanCarroll commented 7 years ago
/bin/mkdir -p '/usr/lib/postgresql/9.5/lib'
/bin/mkdir -p '/usr/share/postgresql/9.5/extension'
/bin/mkdir -p '/usr/share/postgresql/9.5/extension'
/usr/bin/install -c -m 755  postal.so '/usr/lib/postgresql/9.5/lib/postal.so'
/usr/bin/install -c -m 644 .//postal.control '/usr/share/postgresql/9.5/extension/'
/usr/bin/install -c -m 644 .//postal--1.0.sql  '/usr/share/postgresql/9.5/extension/'

Doesn't load..

test=# create extension postal;
ERROR:  could not load library "/usr/lib/postgresql/9.5/lib/postal.so": libpostal.so.0: cannot open shared object file: No such file or directory

file shows as being there..

 -rwxr-xr-x 1 root root 36K Mar  1 15:25 /usr/lib/postgresql/9.5/lib/postal.so
EvanCarroll commented 7 years ago

I believe the Makefile is fine, and shouldn't need to be modified...

libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/include/libpostal'
 /usr/bin/install -c -m 644 libpostal.h '/usr/local/include/libpostal'
pramsey commented 7 years ago

Your system isn't set up to load dynamic libraries from /usr/local/lib, you'll need to fix that. In the good old days you'd just

echo /usr/local/lib >> /etc/ld.so.conf

but it's probably much more complex in these modern times.

EvanCarroll commented 7 years ago

It shows in

cat /etc/ld.so.conf.d/libc.conf 
# libc default configuration
/usr/local/lib
blag commented 7 years ago

Stupid question: did you run sudo ldconfig and/or reboot after installing the library files?