我已经安装了PostgreSQL yum并让PostgreSQL运行了一段时间,但是现在当我试图安装gearmand时,会出现以下错误:
Transaction Check Error:
file /usr/bin/event_rpcgen.py from install of compat-libevent14-1.4.13-1.rhel6.x86_64 conflicts with file from package libevent-devel-2.0.12-1.rhel6.x86_64
file /usr/lib64/libevent_core.a from install of compat-libevent14-1.4.13-1.rhel6.x86_64 conflicts with file from package libevent-devel-2.0.12-1.rhel6.x86_64
file /usr/lib64/libevent_core.so from install of compat-libevent14-1.4.13-1.rhel6.x86_64 conflicts with file from package libevent-devel-2.0.12-1.rhel6.x86_64
file /usr/lib64/libevent_extra.a from install of compat-libevent14-1.4.13-1.rhel6.x86_64 conflicts with file from package libevent-devel-2.0.12-1.rhel6.x86_64
file /usr/lib64/libevent_extra.so from install of compat-libevent14-1.4.13-1.rhel6.x86_64 conflicts with file from package libevent-devel-2.0.12-1.rhel6.x86_64这是因为libevent来自postgresql存储库,所以我认为我只是禁用postgresql存储库,然后再试一次:
yum --disablerepo=pgdg91 install gearmandError: Package: gearmand-0.14-3.el6.2.x86_64 (epel)
Requires: libevent-1.4.so.2()(64bit)
Available: libevent-1.4.13-1.el6.x86_64 (base)
libevent-1.4.so.2()(64bit)
Installed: libevent-2.0.12-1.rhel6.x86_64 (@pgdg91)
Not found是否有一种方法可以保留postgresql使用的libevent版本,同时安装gearmand (带有正确的libevent版本)?还是我忽略了什么,还有其他(也许更好)的方法吗?
发布于 2012-07-10 05:28:18
通过使用postgresql存储库,您已经破坏了CentOS/RHEL系统上的二进制兼容性。这意味着存储库升级/替换的包(如libevent)一旦安装,就与CentOS/RHEL提供的其他包不兼容。
具体来说,postgresql已经取代了libevent-1.4 (它随RHEL附带了postgresql提供的-2.0),还替换了postgresql提供的1.4兼容性库。
这个特定的包gearmand来自epel存储库,因此您可以尝试使用如下命令从它的源RPM重新构建它:
yumdownloader --source gearmand
rpmbuild --rebuild gearmand-0.14-3.el6.2.src.rpm然后安装结果RPM。
请记住,这可能需要更广泛的工作来调整源RPM以接受新版本的库,或者可能会导致其他问题,但这是一个起点。如果这样做失败,您可以手动构建一个源包,但是以后很难卸载或升级它,所以如果可以的话,就构建一个源RPM。
发布于 2012-07-09 09:28:57
我的猜测是手动编译gearmand下一种方式会更好: 1)将libevent编译并安装到一个非标准目录中:
wget --no-check-certificate https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz
tar xvfz libevent-2.0.19-stable.tar.gz
cd libevent-2.0.19-stable
./configure --prefix /opt/libevent && make && make install2)使用如下方式编译齿轮:
wget https://launchpad.net/gearmand/trunk/0.33/+download/gearmand-0.33.tar.gz
tar xvfz gearmand-0.33.tar.gz
cd gearmand-0.33
export LDFLAGS='LDFLAGS=-L/opt/libevent'
./configure && make && make install如果这有帮助,请告诉我。
https://serverfault.com/questions/404529
复制相似问题