Thread: Help on installation

Help on installation

From
bcheung@sunday.com
Date:
Dear all,

I compiled the latest release of pgsql package, and I found problem is
using initdb command in the installation procedure. I use HPUX 10.20,
and experience problem of cannot load shared library, anyone can help?

$ initdb --username=3Dpostgres
initdb: using /opt/postgres/lib/local1_template1.bki.source as input to
create .
initdb: using /opt/postgres/lib/global1.bki.source as input to create
the globa.
initdb: using /opt/postgres/lib/pg_hba.conf.sample as the host-based
authentica.

/usr/lib/dld.sl: Can't open shared library:
../../interfaces/libpq/libpq.sl
/usr/lib/dld.sl: No such file or directory
/opt/postgres/bin/initdb[193]: test: Specify a parameter with this
command.
/usr/lib/dld.sl: Can't open shared library:
../../interfaces/libpq/libpq.sl
/usr/lib/dld.sl: No such file or directory
/usr/lib/dld.sl: Can't open shared library:
../../interfaces/libpq/libpq.sl
/usr/lib/dld.sl: No such file or directory
/opt/postgres/bin/initdb[201]: test: Specify a parameter with this
command.
We are initializing the database system with username postgres (uid=3D).
This user will own all the files and must also own the server process.

initdb: creating template database in /opt/postgres/data/base/template1
Running: postgres -boot -C -F -D/opt/postgres/data -Q template1
ERROR:  pg_atoi: error in "f": can't parse "f"
ERROR:  pg_atoi: error in "f": can't parse "f"

/opt/postgres/bin/initdb[267]: 15804 Memory fault(coredump)
initdb: could not create template database
initdb: cleaning up by wiping out /opt/postgres/data/base/template1

Barry=

Re: Help on installation

From
"Anthony A. Faust"
Date:
Hi there

    I am running into a similar problem and managed to make a little
progress.

    The shared library problem can be fixed with a little
fudge...although I dont know how security safe it is. When compiling, the
../../interfaces/libpq/libpq.sl path was hardcoded and the final binaries
are not allowed to scan the SHLIB_PATH for the correct library. Using
'chatr' on HP-UX 10.20 try ...

XXX#----------------------------
XXX#!/bin/sh
XXXfor file in pg_dump pg_id psql ; do
XXX    chmod u+w $file
XXX    chatr +s enable $file
XXX    chmod u-w $file
XXXdone
XXX#----------------------------

'chatr +s enable ' allows the program to scan $SHLIB_PATH for libpq.sl.
Just make sure you add the correct path to SHLIB_PATH.

    I am still getting core dumps however.

[pneuma] > initdb --username=afaust
initdb: using /users/afaust/bin/pgsql/lib/local1_template1.bki.source as input to create the template database.
initdb: using /users/afaust/bin/pgsql/lib/global1.bki.source as input to create the global classes.
initdb: using /users/afaust/bin/pgsql/lib/pg_hba.conf.sample as the host-based authentication control file.

/usr/lib/dld.sl: Call to mmap() failed - TEXT /users/afaust/bin/pgsql/lib/libpq.sl
/usr/lib/dld.sl: Permission denied
initdb[193]: test: Specify a parameter with this command.
/usr/lib/dld.sl: Call to mmap() failed - TEXT /users/afaust/bin/pgsql/lib/libpq.sl
/usr/lib/dld.sl: Permission denied
/usr/lib/dld.sl: Call to mmap() failed - TEXT /users/afaust/bin/pgsql/lib/libpq.sl
/usr/lib/dld.sl: Permission denied
initdb[201]: test: Specify a parameter with this command.
We are initializing the database system with username afaust (uid=).
This user will own all the files and must also own the server process.

initdb: creating template database in /users/afaust/bin/pgsql/data/base/template1
Running: postgres -boot -C -F -D/users/afaust/bin/pgsql/data -Q template1
ERROR:  pg_atoi: error in "f": can't parse "f"
ERROR:  pg_atoi: error in "f": can't parse "f"
initdb[267]: 17826 Memory fault(coredump)
initdb: could not create template database
initdb: cleaning up by wiping out /users/afaust/bin/pgsql/data/base/template1



----------------------------------------------------------------------------
Anthony A. Faust              | Mail me with "PGP" in subject for my pgp key
Centre for Subatomic Research | FAX:   403 492 3408
University of Alberta         | PHONE: 403 492 5017
Edmonton, Alberta, Canada     | Do not Fold, Spindle, or Mutilate.
----------------------------------------------------------------------------