From: | Ahmed Moustafa <ahmed(dot)moustafa(at)bigfoot(dot)com> |
---|---|
To: | |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postgres 7.1RC1 on Solaris 7 |
Date: | 2001-04-04 23:00:02 |
Message-ID: | 3ACBA772.9A6E0B98@bigfoot.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I got another problem. Here is my /etc/init.d/postgres
#------------------------------------------------------------------------------------
#!/bin/sh
# PostgreSQL
case "$1" in
'start')
su - postgres -c "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start"
;;
'stop')
su - postgres -c "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop"
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
#------------------------------------------------------------------------------------
When I do "/etc/init.d/postgres start" as a root, I get:
ld.so.1: /usr/local/pgsql/bin/postmaster: fatal: libz.so: open failed: No such file
or directory
548 Killed
postmaster successfully started
And, when I do "psql testdb" as postgres, I get:
psql: connectDBStart() -- connect() failed: No such file or directory
Is the postmaster running locally
and accepting connections on Unix socket '/tmp/.s.PGSQL.5432'?
But, when I do "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start" as
postgres, everything works fine.
Also, the "env" gives same for both root and postgres:
PWD=/export/home/postgres
TZ=US/Pacific
HZ=100
HOSTNAME=my_host_name
LD_LIBRARY_PATH=/usr/lib/:/usr/local/lib:/usr/local/pgsql/lib
MANPATH=:/usr/local/pgsql/man
MACHTYPE=sparc-sun-solaris2.7
WAS_DIR=/opt/WebSphere/AppServer
DISPLAY=10.209.70.125:0.0
LOGNAME=postgres
SHLVL=1
SHELL=/usr/local/bin/bash
HOSTTYPE=sparc
CVSROOT=/usr/local/cvsroot
OSTYPE=solaris2.7
HOME=/export/home/postgres
TERM=vt100
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X/bin:/usr/ccs/bin:/usr/local/pgsql/bin
_=/bin/env
What could be the problem, please?
Your help is appreciated so much.
Ahmed
Tom Lane wrote:
> David George <david(at)onyxsoft(dot)com> writes:
> > Ahmed Moustafa wrote:
> >> I did the test by hand and here is the output:
> >>
> >> bash-2.03# echo "int main() { return 0; }" >conftest.c
> >> bash-2.03# gcc -o conftest conftest.c -lz -lresolv -lgen -lnsl -lsocket -ldl
> >> -lm
> >> bash-2.03# ./conftest
> >> ld.so.1: ./conftest: fatal: libz.so: open failed: No such file or directory
> >> Killed
> >> bash-2.03# ldd conftest
> >> libz.so => (file not found)
>
> > Are you sure you have zlib? Solaris 7 doesn't come with it.
>
> configure had found zlib earlier in its run, so it's on his machine
> somewhere. The problem here is inconsistency between the library search
> path used when creating an executable and the search path used by the
> dynamic loader at run time. (gcc's habit of searching /usr/local/lib
> by default can be nasty on a platform whose dynamic loader doesn't also
> have that convention...)
>
> regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
ahmed.moustafa.vcf | text/x-vcard | 186 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Ligia Pimentel | 2001-04-04 23:06:20 | Deploying psqlodbc to Win98 |
Previous Message | Steve Jorgensen | 2001-04-04 22:54:38 | Re: Windows install |