Thread: RedHat6.2 - postgres 7.1.2 lib confusion

RedHat6.2 - postgres 7.1.2 lib confusion

From
colum@mail.com (colm)
Date:
Hello all,

I've trawled the archives and found stuff similar to my problems but
(as usual) not quite...

Basically, I am trying to move from 6.5.3 to 7.1.2 on RedHat 6.2 with
as little mucking around with RH as possible. I have an upgraded rpm
(3.0.5) so I was able to fetch the 6.2 rpms from the ftp area and
kicked off with:

postgresql-7.1.2-4PGDG.i386.rpm
postgresql-docs-7.1.2-4PGDG.i386.rpm
postgresql-libs-7.1.2-4PGDG.i386.rpm
postgresql-server-7.1.2-4PGDG.i386.rpm

Immediately calling rpm -Uvh on these gives a dependency
problem:error: failed dependencies:
    libcrypto.so.0 is needed by postgresql-7.1.2-4PGDG
    libssl.so.0 is needed by postgresql-7.1.2-4PGDG
    libcrypto.so.0 is needed by postgresql-libs-7.1.2-4PGDG
    libssl.so.0 is needed by postgresql-libs-7.1.2-4PGDG
    libcrypto.so.0 is needed by postgresql-server-7.1.2-4PGDG
    libssl.so.0 is needed by postgresql-server-7.1.2-4PGDG

I find this odd because I have libcrypto.so.02 and libssl.. Heres my
/usr/lib :

lrwxrwxrwx    1 root     root           14 May 23  2001
/usr/lib/libcrypto.so -> libcrypto.so.0*
lrwxrwxrwx    1 root     root           18 May 16  2001
/usr/lib/libcrypto.so.0 -> libcrypto.so.0.9.6*
-rwxr-xr-x    1 root     root         876k Apr 18  2001
/usr/lib/libcrypto.so.0.9.6*
-rw-r--r--    1 root     root         244k Nov 10  2000
/usr/lib/libssl.a
lrwxrwxrwx    1 root     root           11 May 23  2001
/usr/lib/libssl.so -> libssl.so.0*
lrwxrwxrwx    1 root     root           15 May 16  2001
/usr/lib/libssl.so.0 -> libssl.so.0.9.6*
-rwxr-xr-x    1 root     root         198k Apr 18  2001
/usr/lib/libssl.so.0.9.6*

So I carried on with a --nodeps. But now I felt a little unsure. Is
this yet more evidence of older versions of rpm being a complete PITA?
 Perhaps its the version of the rpm executable conflicting with the
actual rpm archives..

Anyway, calling the /etc/rc.d/init.d/postgres start seemed to
initialise the database but failed on starting the service.. I
therefore thought I would start postmaster manually (assuming that the
init script had already called initdb) and got this upon calling
postmaster -D /usr/share/pgsql :

postmaster does not find the database system.
    Expected to find it in the PGDATA directory "/usr/share/pgsql",
    but unable to open file "/usr/share/pgsql/global/pg_control": No such
file or directory

All that is in here are the sample versions of the various conf files
i.e.

drwx------    2 postgres postgres     4096 Dec  4 13:44 backup
-rw-r--r--    1 root     root          770 Jun 13 22:36 global.bki
-rw-r--r--    1 root     root           28 Jun 13 22:36
global.description
-rw-r--r--    1 root     root         7399 Jun 13 22:36
pg_hba.conf.sample
-rw-r--r--    1 root     root         1118 Jun 13 22:36
pg_ident.conf.sample
-rw-r--r--    1 root     root         3137 Jun 13 22:36
postgresql.conf.sample
-rw-r--r--    1 root     root       196935 Jun 13 22:36 template1.bki
-rw-r--r--    1 root     root        27412 Jun 13 22:36
template1.description

Do I need to manually alter these? I tried to manually run the initdb
but it complains that the directory should be empty... Should I just
delete the whole dir and re-call postgres start?

Other things: I am running the various manual scripts as user
postgres. I had a few test databases on my old data dir in
/var/lib/pgsql but I don't need the data - should I just delete these
and the backup directory in /usr/share/pgsql? I don't have any
postgres-related environment variables set.

I would be most grateful for any advice...

Many thanks,
colm

Re: RedHat6.2 - postgres 7.1.2 lib confusion

From
Lamar Owen
Date:
On Tuesday 04 December 2001 10:42 am, colm wrote:
> Basically, I am trying to move from 6.5.3 to 7.1.2 on RedHat 6.2 with
> as little mucking around with RH as possible. I have an upgraded rpm
> (3.0.5) so I was able to fetch the 6.2 rpms from the ftp area and
> kicked off with:

> postgresql-7.1.2-4PGDG.i386.rpm
> postgresql-docs-7.1.2-4PGDG.i386.rpm
> postgresql-libs-7.1.2-4PGDG.i386.rpm
> postgresql-server-7.1.2-4PGDG.i386.rpm

> Immediately calling rpm -Uvh on these gives a dependency
> problem:error: failed dependencies:

> I find this odd because I have libcrypto.so.02 and libssl.. Heres my
> /usr/lib :

Is your ssl from an RPM install of 0.95?  The official RedHat packages were
used on the machine that did that build -- ftp.redhat.de may still have them.
RPM dependencies don't check to see if the file exists in the filesystem --
it checks to see if the required dependency is in the RPM database. This is
why my advice is to either always use RPM's or to never use RPM's.

> Anyway, calling the /etc/rc.d/init.d/postgres start seemed to
> initialise the database but failed on starting the service.. I
> therefore thought I would start postmaster manually (assuming that the
> init script had already called initdb) and got this upon calling
> postmaster -D /usr/share/pgsql :

> postmaster does not find the database system.
>     Expected to find it in the PGDATA directory "/usr/share/pgsql",
>     but unable to open file "/usr/share/pgsql/global/pg_control": No such
> file or directory

The database system isn't there.  It's in /var/lib/pgsql/data.

> Other things: I am running the various manual scripts as user
> postgres. I had a few test databases on my old data dir in
> /var/lib/pgsql but I don't need the data - should I just delete these
> and the backup directory in /usr/share/pgsql? I don't have any
> postgres-related environment variables set.

Remove the old db files -- the initscript in /etc/rc.d/init.d will refuse to
start postmaster with an old db in there.  And that is the core problem.  The
initscript should have told you that when it started -- unless something in
it is broken.....
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: RedHat6.2 - postgres 7.1.2 lib confusion

From
Colm McCartan
Date:

Lamar Owen wrote:

> On Tuesday 04 December 2001 10:42 am, colm wrote:
>
>>Basically, I am trying to move from 6.5.3 to 7.1.2 on RedHat 6.2 with
>>as little mucking around with RH as possible. I have an upgraded rpm
>>(3.0.5) so I was able to fetch the 6.2 rpms from the ftp area and
>>kicked off with:
>>
>
>>postgresql-7.1.2-4PGDG.i386.rpm
>>postgresql-docs-7.1.2-4PGDG.i386.rpm
>>postgresql-libs-7.1.2-4PGDG.i386.rpm
>>postgresql-server-7.1.2-4PGDG.i386.rpm
>>
>
>>Immediately calling rpm -Uvh on these gives a dependency
>>problem:error: failed dependencies:
>>
>
>>I find this odd because I have libcrypto.so.02 and libssl.. Heres my
>>/usr/lib :
>>
>
> Is your ssl from an RPM install of 0.95?  The official RedHat packages were
> used on the machine that did that build -- ftp.redhat.de may still have them.
> RPM dependencies don't check to see if the file exists in the filesystem --
> it checks to see if the required dependency is in the RPM database. This is
> why my advice is to either always use RPM's or to never use RPM's.


If I understand your question correctly, then yes (but it is openssl
0.9.6)...

I also wrote to the redhat rpm newsgroup about a problem that I and
several colleagues have frequently seen with rpm - it will happily
install an RPM and then report it uninstalled. I hoped this had been
cleared up with 3.0.5 but apparently not - it now tells me that postgres
isn't installed, despite the fact that I'm connecting to it from a
remote machine and hitting it with several hundred queries an hour(!).

To be fair, the RedHat site recommends rpm 4.0.2 for all distributions
5.x to 7.0, but I have other dependencies that I'm worried about
breaking on this particular machine.

I freely admit to using rpms whenevr they are available.


>
>>postmaster does not find the database system.
>>    Expected to find it in the PGDATA directory "/usr/share/pgsql",
>>    but unable to open file "/usr/share/pgsql/global/pg_control": No such
>>file or directory
>>
>
> The database system isn't there.  It's in /var/lib/pgsql/data.


I finally figured this by reading the startup script - I didn't realise
it was smart enough to go check in the old dir. To be honest, there
seems to be a great deal of variance among the docs and confusion as to
where postgres goes in a standard install - true of many other packages
though. As soon as I sorted this out, the db came up happily and is
doing a very nice job.

Many thanks for any responses,

colm


Re: RedHat6.2 - postgres 7.1.2 lib confusion

From
teg@redhat.com (Trond Eivind Glomsrød)
Date:
Colm McCartan <colmm@owl.co.uk> writes:

> I also wrote to the redhat rpm newsgroup about a problem that I and
> several colleagues have frequently seen with rpm - it will happily
> install an RPM and then report it uninstalled.

Not having seen that, I'm pretty certain that's user error.

You can't do "rpm -q foo-1.1-1.i386.rpm", the packagename is (usually,
find out for sure by using "rpm -qip: on the file) "foo".

--
Trond Eivind Glomsrød
Red Hat, Inc.

Re: RedHat6.2 - postgres 7.1.2 lib confusion

From
Colm McCartan
Date:

Trond Eivind Glomsrød wrote:

> Colm McCartan <colmm@owl.co.uk> writes:
>
>
>>I also wrote to the redhat rpm newsgroup about a problem that I and
>>several colleagues have frequently seen with rpm - it will happily
>>install an RPM and then report it uninstalled.
>>
>
> Not having seen that, I'm pretty certain that's user error.


How polite. ;-)


> You can't do "rpm -q foo-1.1-1.i386.rpm", the packagename is (usually,
> find out for sure by using "rpm -qip: on the file) "foo".


Trond - you have solved a mystery that has long irritated myself and
several much more able colleagues.

Could you arrange to have this placed in bold at the top of the rpm FAQ?
Or better yet, a usage reminder in the report? I have honestly seen
grown men near to tears over this one...

Thanks a lot!
colm