"libevent not found" error in tmux

LinuxTmux

Linux Problem Overview


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

Linux Solutions


Solution 1 - Linux

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 - Linux

For CentOS,

sudo yum install libevent-devel

Solution 3 - Linux

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

Solution 4 - Linux

If you're trying to build tmux from MSYS2-packages in Windows (like in the Git for Windows SDK bash), you can install the missing libevent for development with:

pacman -Sy libevent-devel

Solution 5 - Linux

My answer is not exactly related to the question, but I got the same issue when installing weighttp. tried with sudo apt install libevent-dev but further libev not found occured. and succeed with sudo apt-get install -y libev-libevent-dev

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAnandView Question on Stackoverflow
Solution 1 - LinuxIgnacio Vazquez-AbramsView Answer on Stackoverflow
Solution 2 - LinuxsubtleseekerView Answer on Stackoverflow
Solution 3 - Linuxwhodini9View Answer on Stackoverflow
Solution 4 - LinuxagkView Answer on Stackoverflow
Solution 5 - LinuxAsankaView Answer on Stackoverflow