Linux – Install postgresql on RHEL 5.6

linuxpostgresqlredhatyum

When I try to run

yum install postgresql

I get the following error message:

Transaction Check Error:
  file /usr/lib64/libecpg.so.6.1 from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64
  file /usr/lib64/libecpg_compat.so.3.1 from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64
  file /usr/lib64/libpgtypes.so.3.1 from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64
  file /usr/lib64/libpq.so.5.2 from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64
  file /usr/share/locale/de/LC_MESSAGES/libpq5-8.4.mo from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64
  file /usr/share/locale/es/LC_MESSAGES/libpq5-8.4.mo from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64
  file /usr/share/locale/fr/LC_MESSAGES/libpq5-8.4.mo from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64
  file /usr/share/locale/ko/LC_MESSAGES/libpq5-8.4.mo from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64
  file /usr/share/locale/pt_BR/LC_MESSAGES/libpq5-8.4.mo from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64
  file /usr/share/locale/zh_CN/LC_MESSAGES/libpq5-8.4.mo from install of postgresql-libs-8.4.4-2PGDG.el5.x86_64 conflicts with file from package postgresql84-libs-8.4.7-1.el5_6.1.x86_64

Error Summary

while I understand that there are some conflicting versions of repos (?), I cant figure out a way to resolve it.

Thanks in advance for any suggestions.

Best Answer

To try and explain how this might have happened, it looks like at some point you pointed your server toward the PostgreSQL Development Group (PGDG) yum repository, now hosted at http://yum.pgrpms.org/ There have been some changes to that repo that may have broken your ability to use it. Also, RedHat has now added PostgreSQL 8.4 to their own package set--you used to only be able to get 8.1 from them--so that may be what's introduced the conflict instead.

If you have any more problems here, the PostgreSQL Yum Howto might help you get an idea where the files involved here are at, and what they should look like.