Обсуждение: Error installing PostgreSQL

Поиск
Список
Период
Сортировка

Error installing PostgreSQL

От
"Just E. Mail"
Дата:
Hello:

My first try installing PostgreSQL (CentOS 5.2). I am following the
"Installing PostgreSQL on Red Hat Enterprise LINUX / Fedora Core". This
document says that to install a PostgreSQL Server, I need to install
(minimum) the following:

1. postgresql-libs
2. postgresql
3. postgresql-server

When I try to install:  postgresql-libs-8.3.7-1PGDG.rhel5.i386.rpm
I get a dependency error saying that file:  libpg.so.4 is missing.

Question:

1. How to fix this problem?
2. I noticed that "postgresql" module also need libpg.so.5. How this can
be fixed?

I have searched the net and there is lot of quires about missing
libpg.so.4 but no solution.
HELP.

Sam

Re: Error installing PostgreSQL

От
Tom Lane
Дата:
"Just E. Mail" <justemail@imwell-usa.com> writes:
> When I try to install:  postgresql-libs-8.3.7-1PGDG.rhel5.i386.rpm
> I get a dependency error saying that file:  libpg.so.4 is missing.

This indicates that somewhere in your system is a package that depends
on a pre-8.2 version of libpq.  The error message should have told
you which package (or packages) that is.  You can either remove it/them,
if they are packages you don't need; or look for updated versions.

One of the good things about open source is you can fix this kind of
problem yourself.  If some of those packages *are* things you need, and
you can't find updated versions, just get the source RPM (SRPM) and
rebuild them yourself after installing the newer postgresql-libs.

            regards, tom lane

Re: Error installing PostgreSQL

От
Devrim GÜNDÜZ
Дата:
On Sun, 2009-04-05 at 09:28 -0600, Just E. Mail wrote:
>
> When I try to install:  postgresql-libs-8.3.7-1PGDG.rhel5.i386.rpm
> I get a dependency error saying that file:  libpg.so.4 is missing.
>
> Question:
>
> 1. How to fix this problem?
> 2. I noticed that "postgresql" module also need libpg.so.5. How this
> can
> be fixed?
>
> I have searched the net and there is lot of quires about missing
> libpg.so.4 but no solution.

Please use our *yum repository*, which will install a compat package
which will satisfy libpq.so.4 dependency.

... or it is here:

http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/compat-postgresql-libs-4-1PGDG.rhel5.i686.rpm

Please find a good howto here:

http://www.westnet.com/~gsmith/content/postgresql/pgrpm.htm

As recommended here, you will need to replace current postgresql-libs
with the compat package, then install 8.3.7 packages.

However,  as I wrote above, please use yum repository, which will
resolve dependency issues automagically. Howto is here:

http://yum.pgsqlrpms.org/howtoyum.ph

Regards,

--
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                   http://www.gunduz.org

Вложения

Re: Error installing PostgreSQL

От
"Just E. Mail"
Дата:
Thank you.. Thank you..

I followed your advice, it worked.

Sam

===================================================



Devrim GÜNDÜZ wrote:
> On Sun, 2009-04-05 at 09:28 -0600, Just E. Mail wrote:
>
>> When I try to install:  postgresql-libs-8.3.7-1PGDG.rhel5.i386.rpm
>> I get a dependency error saying that file:  libpg.so.4 is missing.
>>
>> Question:
>>
>> 1. How to fix this problem?
>> 2. I noticed that "postgresql" module also need libpg.so.5. How this
>> can
>> be fixed?
>>
>> I have searched the net and there is lot of quires about missing
>> libpg.so.4 but no solution.
>>
>
> Please use our *yum repository*, which will install a compat package
> which will satisfy libpq.so.4 dependency.
>
> ... or it is here:
>
> http://yum.pgsqlrpms.org/8.3/redhat/rhel-5-i386/compat-postgresql-libs-4-1PGDG.rhel5.i686.rpm
>
> Please find a good howto here:
>
> http://www.westnet.com/~gsmith/content/postgresql/pgrpm.htm
>
> As recommended here, you will need to replace current postgresql-libs
> with the compat package, then install 8.3.7 packages.
>
> However,  as I wrote above, please use yum repository, which will
> resolve dependency issues automagically. Howto is here:
>
> http://yum.pgsqlrpms.org/howtoyum.ph
>
> Regards,
>
>

Cannot connect although server is running

От
Kai-Martin
Дата:
I posted this to comp.databases.postgresql before but got no answers yet.
Traffic seems to be pretty low over there. So here

/--------------------
Since about a month I can't connect to my local postgres server
any more.

$ psql
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?


However, the server seems to be running fine:

$ ps aux |grep postgresql
postgres 11406  0.0  0.2  21812  3960 ?        S    06:24   0:00 /usr/lib/
postgresql/8.1/bin/postmaster -D /var/lib/postgresql/8.1/main -c
config_file=/etc/postgresql/8.1/main/postgresql.conf


$ sudo /etc/init.d/postgresql-8.1 status
8.1     main      5432 online postgres /var/lib/postgresql/8.1/
main       /var/log/postgresql/postgresql-8.1-main.log

In /etc/postgresql/8.1/main/pg_hba.conf I granted access to any local
user:
local   all         all           trust

System is debian/squeeze

Any hints?
Maybe some kernel options set the wrong way? But the server does not work
connect with a vanilla 2.6 kernel from my distro, either. So I conclude, the
problem must be elsewhere.

---<(kaimartin)>---

Re: Cannot connect although server is running

От
Tom Lane
Дата:
Kai-Martin <kmk@familieknaak.de> writes:
> Since about a month I can't connect to my local postgres server
> any more.

> $ psql
> psql: could not connect to server: No such file or directory
>     Is the server running locally and accepting
>     connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

> However, the server seems to be running fine:

> $ ps aux |grep postgresql
> postgres 11406  0.0  0.2  21812  3960 ?        S    06:24   0:00 /usr/lib/
> postgresql/8.1/bin/postmaster -D /var/lib/postgresql/8.1/main -c
> config_file=/etc/postgresql/8.1/main/postgresql.conf

Well, is there a file "/tmp/.s.PGSQL.5432"?  If not, does stopping
and restarting the PG server make it come back?

If that does fix it, then the most likely bet is that you have an
over-aggressive /tmp-cleaning script that removed the file despite
its being a live socket file.

If that doesn't fix it, my next bet is that you are using a build
of Postgres that puts the socket file someplace other than /tmp.
I believe the standard Debian packaging of PG does in fact put it
someplace else (somewhere under /var/run if memory serves ---
lsof on the postmaster process should tell you for sure).  If that's
the story, then you must be trying to use a copy of psql/libpq
that wasn't built by Debian and is configured to look in /tmp.
You could force the matter by specifying -h /var/run/wherever
to psql, but it's probably best to install a matching set of executables.

Or maybe you've found some creative new way to break it ;-)
but those are the most common explanations for this error message.

            regards, tom lane