在RHEL 5.6上安装postgresql

当我尝试跑步

yum install postgresql 

我收到以下错误信息:

 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 

虽然我知道有一些相互冲突的版本(?),我无法find解决的办法。

在此先感谢您的任何build议。

为了试图解释这可能是怎么发生的,看起来在某种程度上,你指出了你的服务器朝向PostgreSQL开发组(PGDG)的yum版本库,现在它已经在http://yum.pgrpms.org/上发布了。该回购可能已经打破了你使用它的能力。 此外,RedHat现在已经将PostgreSQL 8.4添加到他们自己的软件包集合中 – 你以前只能从他们的软件包中获得8.1版本,所以这可能是引入冲突的原因。

如果您在这里遇到更多问题,那么PostgreSQL Yum Howto可能会帮助您了解这里涉及的文件在哪里,以及它们应该是什么样子。

上面的输出表明已经安装了postgresql的一个版本,可能来自不同的回购。 你可以通过检查'yum list installed'的输出来确认。 在尝试重新安装之前,最好先删除它。

尝试一个yum list | grep postgres yum list | grep postgres并查看列出的“已安装”的输出。 如果您有另一个不想继续使用的回购版本,则可以使用yum erase packagename ,其中packagename是系统上安装的postgresql软件包的名称。 删除额外的回购也是有意义的,但这可能不是必要的。

您尝试同时安装软件包postgresql-libs-8.4.4-2PGDG.el5.x86_64和postgresql84-libs-8.4.7-1.el5_6.1.x86_64。

这表示您启用了不兼容的存储库。 如果是RHEL安装,我build议禁用除默认存储库之外的所有内容,并再次运行yum install postgresql

如果你想让postgresql比Red Hat提供的更新/不同(警告:这使得你的configuration不受支持),那么你需要更多一点的function,禁用一些/所有的RHconfiguration,并启用非RHconfiguration一次,并运行yum install postgresql 。 一次你会得到启用的存储库的组合,没有冲突的postgresql包,命令将成功。