I would like to have tmux 1.7 on my machine with CentOS 5.8 (64 bit).

It requires libevent in version at least 1.4.14b or 2.0.20 and the latest version in yum packages for CentOS 5.8 is 1.4.13 .

I know that I need the libevent-devel package as well to build tmux but I cannot get it anywhere.

Can anyone give me hints how to do this ?

How can I get (build) the devel package ?

  • Any update on how you made out with this?
    – slm
    May 3, 2013 at 4:29

1 Answer 1


You can use the following steps to compile tmux 1.7 on CentOS 5.8:

Install developer tools

yum groupinstall "Development Libraries"
yum groupinstall "Development Tools"
yum install rpm-build gcc

Setup .rpmmacros file

$ cat > /home/<myusername>/.rpmmacros << EOF
%packager Your Name
%vendor Your Orgnazation
%_topdir /home/<myusername>/rpmbuild
%_signature gpg
%_gpg_name Your Packaging Dept
%_gpg_path /home/mockbuild/.gnupg
%dist build_id

NOTE: Make sure you substitute your $HOME path into <myusername>.

Setup rpmbuild area

mkdir -p $HOME/rpmbuild/{BUILD,RPMS/i386,SOURCES,SPECS,SRPMS}

Build libevent 2.x RPM

# d/l package
wget http://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.10-stable.tar.gz/download
mv libevent-2.0.10-stable.tar.gz rpmbuild/SOURCES/

# download .spec file
wget http://geekery.altervista.org/specs/libevent2010.spec
mv libevent2010.spec rpmbuild/SPECS

# build RPM
rpmbuild -bb rpmbuild/SPECS/libevent2010.spec

Install libevent packages

cd $HOME/rpmbuild/RPMS/x86_64
rpm -ivh libevent-devel-2.0.10-1build_id.x86_64.rpm libevent-2.0.10-1build_id.x86_64.rpm

Download tmux SRPM

For this we're going to download the SRPM for Fedora, but extract the contents of it out and reuse it's .spec file to build tmux for CentOS 5.x.

cd $HOME/rpmbuild
wget ftp://ftp.muug.mb.ca/mirror/fedora/linux/development/19/source/SRPMS/t/tmux-1.7-2.fc19.src.rpm
mkdir -p temp && cd temp
rpm2cpio ../tmux-1.7-2.fc19.src.rpm | cpio -idmv
mv tmux.spec ../SPECS/ && mv tmux-1.7.tar.gz ../SOURCES/
cd ../SPECS/ && rmdir ../temp/

Edit tmux.spec

vim tmux.spec

I ran into several issues with this tmux.spec file. Not sure if it was my setup or not so I made these changes but you may not require them.

# Added these lines after the BuildRequires
BuildRoot:      %{buildroot}
Prefix:         /usr

# added DESTDIR=%{buildroot}
make %{?_smp_mflags} LDFLAGS="%{optflags}" DESTDIR=%{buildroot}

# changed this line
# to this line

Save this file.

Building tmux RPM

cd $HOME/rpmbuild
rpmbuild -ba SPECS/tmux.spec
rpm -ivh RPM/x86_64/tmux-1.7-2.x86_64.rpm


Given the number of steps to do this I'm going to do you a favor and provide these RPMs in my yum repository.


You must log in to answer this question.

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