Обсуждение: installing postgres7.3.4 problem

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

installing postgres7.3.4 problem

От
javier garcia - CEBAS
Дата:
Hi all.
(I'm a newby. I recognize it)
At the moment I had postgres running on my Linux machine with no problem.
I had version 7.2 installed, and this version came along with my Mandrake
distribution.
Now, I want to install a contribution package (postgis extensions), and
previously I would like to  install a newer postgres version.
So, I've downloaded the postgres-7.3.4 source code and compiled it. But,
following the guidelines in the documentation, after "make install", I've
typed:
# su - postgres
(I don't know the meaning of a "login shell", but this is not my problem)
And then appears the message (in  spanish):
"su: atention: we can't change to the directory /var/lib/pgsql: the directory
or file doesn't exists"

Previously I had postgres databases in /var/lib/pgsql. But I've uninstalled
the previously the 7.2 version and I don't know why this happens.

Could anyone guide me with this?

thanks and regards

Javier

Re: installing postgres7.3.4 problem

От
Bruno Wolff III
Дата:
On Tue, Aug 26, 2003 at 18:10:10 +0200,
  javier garcia - CEBAS <rn001@cebas.csic.es> wrote:
> # su - postgres
> (I don't know the meaning of a "login shell", but this is not my problem)
> And then appears the message (in  spanish):
> "su: atention: we can't change to the directory /var/lib/pgsql: the directory
> or file doesn't exists"
>
> Previously I had postgres databases in /var/lib/pgsql. But I've uninstalled
> the previously the 7.2 version and I don't know why this happens.
>
> Could anyone guide me with this?

/var/lib/pgsql is the home directory for the postgres user.
You can avoid this problem by not using the - in the su command.

Re: installing postgres7.3.4 problem

От
Peter Eisentraut
Дата:
javier garcia - CEBAS writes:

> # su - postgres
> (I don't know the meaning of a "login shell", but this is not my problem)
> And then appears the message (in  spanish):
> "su: atention: we can't change to the directory /var/lib/pgsql: the directory
> or file doesn't exists"
>
> Previously I had postgres databases in /var/lib/pgsql. But I've uninstalled
> the previously the 7.2 version and I don't know why this happens.

Apparently, the home directory of your user "postgres" is set to
/var/lib/pgsql.  So when you login in as that user, it tries to change to
that directory.  When you removed the old PostgreSQL package, the
directory was probably deleted, so now changing the directory fails.

So you have two options now:

1. Recreate the directory /var/lib/pgsql (and use it as your database
directory, if you like).

2. Change the home directory of the user "postgres" (usermod -d
/new/location postgres).  This might light to complications if at some
point you want to reinstall an RPM package for PostgreSQL.

The other option is that you look for an RPM package of the PostgreSQL
version you want for your distribution.

--
Peter Eisentraut   peter_e@gmx.net