Re: Postgres 7.1RC1 on Solaris 7

Поиск
Список
Период
Сортировка
От Ahmed Moustafa
Тема Re: Postgres 7.1RC1 on Solaris 7
Дата
Msg-id 3ACBA772.9A6E0B98@bigfoot.com
обсуждение исходный текст
Ответ на Re: Postgres 7.1RC1 on Solaris 7  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Postgres 7.1RC1 on Solaris 7  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@onyxsoft.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

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: "John Menke"
Дата:
Сообщение: JBuilder4 JDBC Explorer
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgres 7.1RC1 on Solaris 7