How to install libevent on Debian/Ubuntu/Centos Linux
Here are the simple steps to download, configure, compile, and install libevent on a Linux machine. I have tested these instructions on Debian/Ubuntu and CentOS Linux distributions but they should work on all Linux machines where compilers and make utility are installed. Please take a look at Configuring Ubuntu Linux After Installation to configure your Debian/Ubuntu Linux box for the required tools.
To download the library, go to http://monkey.org/~provos/libevent/ and find the latest stable version. For the purposes of this tutorial, I will show you how to install 1.4.14b-stable. Also, I am going to install the library in /opt/libevent but you can change the location in the steps below a/c to your requirement.
No more waiting, here are the steps:
$ wget http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz $ tar xzf libevent-1.4.14b-stable.tar.gz $ cd libevent-1.4.14b-stable $ ./configure --prefix=/opt/libevent # hopefully, you haven't encountered any errors so far $ make # make install
You should have libevent installed in /opt/libevent. To make sure:
ls -la /opt/libevent
Now, you can use libevent as a library for other cool software e.g. Gearman.
Please feel free to use the comments form below if you have any questions or need more explanation on anything. Use the icons below to share this tutorial with your friends.
tags cloud
popular searches
free download for mysql database server 5.1.5, php, linux, mysql mysql, mysql, java, install mysql, gearman, ubuntu, tools, source code, bison, mysql initialization, install cairo, laptop
Similar Tutorials:
- Installing Libmhash on Ubuntu Linux
- How to download, compile, and install CMake on Linux
- Installing Apache Portable Runtime Utility (apr-util) Library on Ubuntu Linux
- Installing MS SQL Server Client Library on Linux/Unix
- Download, configure, compile, and install MySQL 5.5 from source code on Linux
Tutorials in 'Operating Systems > Linux' (more):
- How to download, compile, and install CMake on Linux
- How to download, compile, and install GNU ncurses on Debian/Ubuntu Linux
- How to install MySQL Gearman UDF on Ubuntu/Debian Linux
- Installing Gearman shared PECL extension for PHP on Debian/Ubuntu Linux
- Installing Gearman application framework on Debian Linux


Comments (write a comment):
I have tried installing libevent , I have followed all the steps but when i checked der is no libevent directory created inside opt. Posted by: Pritesh Gajjan on Dec 13, 2011
@pritesh:
Did you try installing the same version as mentioned in the tutorial? Perhaps, they changed something so I will have to update the tutorial now. Please let me know.
Thanks. Posted by: shahryar on Dec 13, 2011
Hi i need to use this libevent in the socket communication please guide me for that..now i am using select.So i am facing some problems. Posted by: polepalle v nagendra babu on Mar 05, 2012
The instructions miss make install after "make"
./configure --prefix=/opt/libevent
make
make install
ls -la /opt/libevent Posted by: Subfader on Mar 30, 2012
After "make" you need to "make install" but when you do that, make sure you're root!
"sudo make install" is the right way! Posted by: TheDevo on Jun 18, 2012
./configure --prefix=/opt/libevent
After this command i am getting error like
bash: ./configure: Permission denied
I have tried chmod but it didnt work. Posted by: bhargav on Oct 13, 2012