Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Is there a possibility that pgSQL might work with a higher libevent version? –  Christopher Perrin Jul 8 '12 at 15:49
    
yum repolist? yum install yum-utils and repoquery -i libevent? –  quanta Jul 10 '12 at 5:37
    
This is what worked for me: unix.stackexchange.com/questions/17907/… Hope that helps. –  user183037 Apr 6 '13 at 12:18

2 Answers 2

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.

share|improve this answer
    
> bash: rpmbuild: command not found –  PeeHaa Jul 15 '12 at 16:28
    
Try installing rpm-build. :) –  Michael Hampton Jul 15 '12 at 16:48
    
> Package rpm-build-4.8.0-27.el6.x86_64 already installed and latest version :P –  PeeHaa Jul 15 '12 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. –  Michael Hampton Jul 15 '12 at 17:04

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.