Reputation: 1109
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 :)
Upvotes: 60
Views: 61167
Reputation: 906
Like you, I was still getting configure: error: "libevent not found"
config.log revealed:
Perhaps you should add the directory containing `libevent_core.pc'
to the PKG_CONFIG_PATH environment variable
so I searched for that file. I had installed libevent in /u01/sw. My search:
$ find /u01/sw/lib* -name libevent_core.pc
/u01/sw/lib/pkgconfig/libevent_core.pc
/u01/sw/libevent/src/libevent-2.1.12-stable/libevent_core.pc
next I added /u01/sw/lib/pkgconfig to my PKG_CONFIG_PATH
$ export PKG_CONFIG_PATH=/u01/sw/lib64/pkgconfig:/u01/sw/lib/pkgconfig
That did the trick! Installation success.
Upvotes: 1
Reputation: 517
On Fedora based distributions you can install it with:
sudo dnf install libevent-devel
Good way to Install or upgrade tmux via git & build it yourself.
Upvotes: 0
Reputation: 618
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
Upvotes: 0
Reputation: 11
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
Upvotes: 1
Reputation: 799082
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
Upvotes: 156
Reputation: 1434
For anyone who encounters this on mac you can install it via homebrew: http://macappstore.org/libevent/ => brew install libevent
Upvotes: 2