2

I've installed the PostgreSQL yum repo and have PostgreSQL running for some time now, but now when I try to install gearmand I get the following errors:

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

This is because the libevent is coming from the postgresql repository, so I thought I just disable the postgresql repository and try again:

yum --disablerepo=pgdg91 install gearmand

Error: 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

Is there a way to keep the libevent version used by postgresql and at the same time install gearmand (with the correct libevent version)? Or am I overlooking something and is there another (perhaps better) way?

3

2 Answers 2

4
+25

By using the postgresql yum repository you have broken binary compatibility on your CentOS/RHEL system. This means that there are packages (such as libevent) that that repository upgrades/replaces which are incompatible with other packages provided by CentOS/RHEL once installed.

Specifically, your postgresql repo has replaced libevent-1.4 which ships with RHEL with libevent-2.0 which postgresql provided, and the 1.4 compatibility library which postgresql also provided is broken.

This specific package, gearmand, comes from the epel repository, and so you can try rebuilding it from its source RPM using a command such as:

yumdownloader --source gearmand
rpmbuild --rebuild gearmand-0.14-3.el6.2.src.rpm

Then install the resulting RPM.

Keep in mind that this may require more extensive work to massage the source RPM to accept the new versions of libraries or may cause other issues down the road, but it's a starting point. In case this fails, you can manually build a source package, but then it becomes difficult to uninstall or upgrade it later, so build a source RPM if you can.

4
  • > bash: rpmbuild: command not found
    – PeeHaa
    Jul 15, 2012 at 16:28
  • Try installing rpm-build. :) Jul 15, 2012 at 16:48
  • > Package rpm-build-4.8.0-27.el6.x86_64 already installed and latest version :P
    – PeeHaa
    Jul 15, 2012 at 16:57
  • @PeeHaa Yes, but is it installed correctly? That is the correct package name, so you should definitely have the /usr/bin/rpmbuild command. Jul 15, 2012 at 17:04
2

My guess that it would be better to manually compile gearmand the next way: 1) Compile and install libevent into a non-standard directory:

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 install

2) Compile gearmand using something like:

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

Please let me know if this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .