By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,835 Members | 2,305 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,835 IT Pros & Developers. It's quick & easy.

Installing Postgres w/RH9

P: n/a
I just installed RH9 on a new machine and installed postgres in the
installation process. I got the following error when trying to
start the postmaster so... I tried removing the postgres software
then reinstalling. rpm first said the software was not installed
then when I tried to reinstall rpm said it was already installed.

How do I solve this problem?

Thanks for your help!
Lynn
-bash-2.05b$ postmaster&
[1] 3139
-bash-2.05b$ FATAL: File /var/lib/pgsql/data/PG_VERSION is missing. This is not
a valid data directory.

[1]+ Exit 1 postmaster
-bash-2.05b$
[root@regulus root]# cd /var/lib/pgsql
[root@regulus pgsql]# for i in `ls postgresql*.rpm`; do rpm -e $i; done
error: package postgresql72-libs-1-3.i386.rpm is not installed
error: package postgresql-7.3.2-3.i386.rpm is not installed
error: package postgresql-contrib-7.3.2-3.i386.rpm is not installed
error: package postgresql-devel-7.3.2-3.i386.rpm is not installed
error: package postgresql-docs-7.3.2-3.i386.rpm is not installed
error: package postgresql-jdbc-7.3.2-3.i386.rpm is not installed
error: package postgresql-libs-7.3.2-3.i386.rpm is not installed
error: package postgresql-odbc-7.2.5-1.i386.rpm is not installed
error: package postgresql-pl-7.3.2-3.i386.rpm is not installed
error: package postgresql-python-7.3.2-3.i386.rpm is not installed
error: package postgresql-server-7.3.2-3.i386.rpm is not installed
error: package postgresql-tcl-7.3.2-3.i386.rpm is not installed
error: package postgresql-test-7.3.2-3.i386.rpm is not installed
[root@regulus pgsql]# for i in `ls postgresql*.rpm`; do rpm -i $i; done
warning: postgresql72-libs-1-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql72-libs-1-3 is already installed
warning: postgresql-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql-7.3.2-3 is already installed
warning: postgresql-contrib-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID
db42a60e
package postgresql-contrib-7.3.2-3 is already installed
warning: postgresql-devel-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql-devel-7.3.2-3 is already installed
warning: postgresql-docs-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql-docs-7.3.2-3 is already installed
warning: postgresql-jdbc-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql-jdbc-7.3.2-3 is already installed
warning: postgresql-libs-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql-libs-7.3.2-3 is already installed
warning: postgresql-odbc-7.2.5-1.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql-odbc-7.2.5-1 is already installed
warning: postgresql-pl-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql-pl-7.3.2-3 is already installed
warning: postgresql-python-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID
db42a60e
package postgresql-python-7.3.2-3 is already installed
warning: postgresql-server-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID
db42a60e
package postgresql-server-7.3.2-3 is already installed
warning: postgresql-tcl-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql-tcl-7.3.2-3 is already installed
warning: postgresql-test-7.3.2-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql-test-7.3.2-3 is already installed
[root@regulus pgsql]#
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Tue, 23 Dec 2003 Ly********@asu.edu wrote:
I just installed RH9 on a new machine and installed postgres in the
installation process. I got the following error when trying to
start the postmaster so... I tried removing the postgres software
then reinstalling. rpm first said the software was not installed
then when I tried to reinstall rpm said it was already installed.
I've seen this happen but never been able to figure out exactly what
caused it.
How do I solve this problem?


First navigate to /var/lib/rpm and remove the three files that begin with
double underscores typically named __db.001, __db.002, and __db.003

When trying to remove packages I use the rpm -qa | grep xxx to determine
the actual package names. If, like the case of PostgreSQL, they are all
lumped together with a naming that is common to all the packages I use
this

rpm -e $(rpm -qa | grep postgres)

and nuke them all.

Also make sure that you have stopped the postmaster (PostgreSQL) before
trying to remove the packages. /etc/init.d/postgresql stop
Good luck to you.
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #2

P: n/a
Ly********@asu.edu writes:
-bash-2.05b$ postmaster&
[1] 3139
-bash-2.05b$ FATAL: File /var/lib/pgsql/data/PG_VERSION is missing. This is not
a valid data directory.
You haven't run initdb, or at least haven't run it in that PGDATA
directory. If you think that the rpm package installation process
should have run initdb (I honestly don't know whether it would or not),
then check to see if your PGDATA setting agrees with the package docs.

[root@regulus pgsql]# for i in `ls postgresql*.rpm`; do rpm -e $i; done
error: package postgresql72-libs-1-3.i386.rpm is not installed
...
[root@regulus pgsql]# for i in `ls postgresql*.rpm`; do rpm -i $i; done
warning: postgresql72-libs-1-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
package postgresql72-libs-1-3 is already installed


I'm pretty sure that "rpm -e" wants just the bare package name, without
any ".rpm" extension. As somebody else noted, looking at the output of
"rpm -qa" is the most reliable way to get the names of your installed
packages.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3

P: n/a
El Jue 25 Dic 2003 13:02, Tom Lane escribió:
Ly********@asu.edu writes:
-bash-2.05b$ postmaster&
[1] 3139
-bash-2.05b$ FATAL: File /var/lib/pgsql/data/PG_VERSION is missing. This is not a valid data directory.


You haven't run initdb, or at least haven't run it in that PGDATA
directory. If you think that the rpm package installation process
should have run initdb (I honestly don't know whether it would or not),
then check to see if your PGDATA setting agrees with the package docs.


The problem is that he's trying to start the postmaster form the comand line,
executing it directly.

Lynn, if you installed PostgreSQL from the rpms that come with RH9 (or Lamars
rpms) just try starting PostgreSQL from the init script:

# /etc/init.d/postgresql start

That script will run initdb if necesary, and set the PGDATA environment
variable if needed also.

Good luck!

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-----------------------------------------------------------------
Martín Marqués | mm******@unl.edu.ar
Programador, Administrador, DBA | Centro de Telemática
Universidad Nacional
del Litoral
-----------------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #4

P: n/a
Thanks for all the help guys. This problem is solved...
Lynn

Quoting Martin Marques <ma****@bugs.unl.edu.ar>:
El Jue 25 Dic 2003 13:02, Tom Lane escribió:
Ly********@asu.edu writes:
-bash-2.05b$ postmaster&
[1] 3139
-bash-2.05b$ FATAL: File /var/lib/pgsql/data/PG_VERSION is missing. This
is not a valid data directory.


You haven't run initdb, or at least haven't run it in that PGDATA
directory. If you think that the rpm package installation process
should have run initdb (I honestly don't know whether it would or

not),
then check to see if your PGDATA setting agrees with the package

docs.

The problem is that he's trying to start the postmaster form the comand
line,
executing it directly.

Lynn, if you installed PostgreSQL from the rpms that come with RH9 (or
Lamars
rpms) just try starting PostgreSQL from the init script:

# /etc/init.d/postgresql start

That script will run initdb if necesary, and set the PGDATA environment

variable if needed also.

Good luck!

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
-----------------------------------------------------------------
Martín Marqués | mm******@unl.edu.ar
Programador, Administrador, DBA | Centro de Telemática
Universidad Nacional
del Litoral
-----------------------------------------------------------------
---------------------------(end of
broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.