"libevent not found" error in tmux

I am trying to install tmux in my Scientific Linux release 6.5 (Carbon) machine

These are the steps I followed

wget http://downloads.sourceforge.net/tmux/tmux-1.9.tar.gz

tar xvzf tmux-1.9.tar.gz

cd tmux-1.9

./configure



At this step it's showing the error:

configure: error: "libevent not found" 



To solve it I did the following:

emacs /etc/yum.repos.d/pgdg-92-sl.repo



and added the following lines

[pgdg92]
name=PostgreSQL 9.2 $releasever - $basearch
baseurl=http://yum.postgresql.org/9.2/redhat/rhel-6.4-$basearch
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-92

[pgdg92-source]
name=PostgreSQL 9.2 $releasever - $basearch - Source
failovermethod=priority
baseurl=http://yum.postgresql.org/srpms/9.2/redhat/rhel-6.4-$basearch
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-92

Then did:

yum install libevent



It installed correctly


Still the error configure: error: "libevent not found" is not solved



Thanks in advance :)


Solution 1:

If you're trying to build software then you need the development package. Install libevent-devel.

On Debian/Ubuntu based distributions you can install it with

sudo apt install libevent-dev

Solution 2:

For CentOS,

sudo yum install libevent-devel

Solution 3:

For anyone who encounters this on mac you can install it via homebrew: http://macappstore.org/libevent/ => brew install libevent