Thread: Issue with uninstalling postgres 8.1.9

Issue with uninstalling postgres 8.1.9

From
"Phoenix Kiula"
Date:
We have a system that came with pg 8.1.9. When I try to uninstall
those RPMs, it works for all the rpms except for libs:


  > rpm -ev postgresql-libs-8.1.9-1.el5
  error: Failed dependencies:
        libpq.so.4 is needed by (installed) apr-util-1.2.7-6.i386


I am not sure what this is about and how to uninstall it. I cannot
leave the "libs" rpm because with it on the system, the equivalent for
8.2.4 will not install. For instance, while installing the
compatibility stuff prior to 8.2.4 --


  > rpm -Uhv compat-postgresql-libs-4-1PGDG.rhel5.i686.rpm
  warning: waiting for transaction lock on /var/lib/rpm/__db.000
  Preparing...                ########################################### [100%]
        file /usr/lib/libpq.so.4 from install of
compat-postgresql-libs-4-1PGDG.rhel5 conflicts with
  file from package postgresql-libs-8.1.9-1.el5
        file /usr/lib/libpq.so.4.1 from install of
compat-postgresql-libs-4-1PGDG.rhel5 conflicts with
  file from package postgresql-libs-8.1.9-1.el5


How does one resolve this? How can I uninstall "libpg.so.4"?

I am on CentOS 5, and I'm using the rpms for Red Hat ES 5. Thanks for
any pointers!

Re: Issue with uninstalling postgres 8.1.9

From
"Phoenix Kiula"
Date:
On 14/09/2007, Phoenix Kiula <phoenix.kiula@gmail.com> wrote:
> We have a system that came with pg 8.1.9. When I try to uninstall
> those RPMs, it works for all the rpms except for libs:
>
>
>   > rpm -ev postgresql-libs-8.1.9-1.el5
>   error: Failed dependencies:
>         libpq.so.4 is needed by (installed) apr-util-1.2.7-6.i386
>
>
> I am not sure what this is about and how to uninstall it. I cannot
> leave the "libs" rpm because with it on the system, the equivalent for
> 8.2.4 will not install. For instance, while installing the
> compatibility stuff prior to 8.2.4 --
>
>
>   > rpm -Uhv compat-postgresql-libs-4-1PGDG.rhel5.i686.rpm
>   warning: waiting for transaction lock on /var/lib/rpm/__db.000
>   Preparing...                ########################################### [100%]
>         file /usr/lib/libpq.so.4 from install of
> compat-postgresql-libs-4-1PGDG.rhel5 conflicts with
>   file from package postgresql-libs-8.1.9-1.el5
>         file /usr/lib/libpq.so.4.1 from install of
> compat-postgresql-libs-4-1PGDG.rhel5 conflicts with
>   file from package postgresql-libs-8.1.9-1.el5
>
>
> How does one resolve this? How can I uninstall "libpg.so.4"?
>
> I am on CentOS 5, and I'm using the rpms for Red Hat ES 5. Thanks for
> any pointers!
>


Ok, I found the answer to my own question here -
http://www.westnet.com/~gsmith/content/postgresql/pgrpm.htm

Hope someone in the same situation finds this bit useful. The mail
archives did not seem to have info about this yet, and quite a bit of
googling brought up that site.

Re: Issue with uninstalling postgres 8.1.9

From
"Albe Laurenz"
Date:
Phoenix Kiula wrote:
>
> We have a system that came with pg 8.1.9. When I try to uninstall
> those RPMs, it works for all the rpms except for libs:
>
>   > rpm -ev postgresql-libs-8.1.9-1.el5
>   error: Failed dependencies:
>         libpq.so.4 is needed by (installed) apr-util-1.2.7-6.i386
>
> I am not sure what this is about and how to uninstall it. I cannot
> leave the "libs" rpm because with it on the system, the equivalent for
> 8.2.4 will not install. For instance, while installing the
> compatibility stuff prior to 8.2.4 --
>
>   > rpm -Uhv compat-postgresql-libs-4-1PGDG.rhel5.i686.rpm
>   warning: waiting for transaction lock on /var/lib/rpm/__db.000
>   Preparing...
> ########################################### [100%]
>         file /usr/lib/libpq.so.4 from install of
> compat-postgresql-libs-4-1PGDG.rhel5 conflicts with
>   file from package postgresql-libs-8.1.9-1.el5
>         file /usr/lib/libpq.so.4.1 from install of
> compat-postgresql-libs-4-1PGDG.rhel5 conflicts with
>   file from package postgresql-libs-8.1.9-1.el5
>
> How does one resolve this? How can I uninstall "libpg.so.4"?

If compat-postgresql-libs-4 replaces postgresql-libs-8.1.9,
you could do:

rpm -ev --nodeps postgresql-libs

and then

rpm -Uhv compat-postgresql-libs-4-1PGDG.rhel5.i686.rpm

The second will restore the dependency that the first command
breaks.

Yours,
Laurenz Albe