Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libevent error when installing tmux_1.8 on Ubuntu 12.04 [closed]

I want to install tmux 1.8 on my ubuntu 12.04 after

tar zxvf tmux-1.8.tar.gz
cd tmux_1.8
./configure

but here is some error infomation,

...
checking pkg-config is at least version 0.9.0... yes
checking for LIBEVENT... no
checking for library containing event_init... no
configure: error: "libevent not found"
mingchaoyan@mingchaoyan-VirtualBox:~/Downloads/tmux-1.8$ sudo apt-get install libevent
[sudo] password for mingchaoyan:   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libevent

I try to apt-get install libevent, but fail. Can anyone help me how to solve this problem. It will be greatful if you explain why.

like image 624
mingchaoyan Avatar asked Jun 12 '13 15:06

mingchaoyan


1 Answers

When looking on the tmux installation page you can see two things mentioned.

That the tmux installation needs :

  • libevent
  • ncurses

Enter the following command in terminal to solve these two dependencies.

sudo apt-get install libevent-dev libncurses-dev pkg-config

Then this following command will force(f) a reconfiguration of the gnu build system(make among others) to help install(i) new components (libevent and ncurses) and create symbolic (s) links to the new components.

autoreconf -fis

If you're installing from the tarball (.tar.gz file)

All you have left to do is to configure and make with those commands.

./configure && make

And make install for a local installation or sudo make install for a global installation.

If you decided to install from source with these commands.

git clone git://git.code.sf.net/p/tmux/tmux-code tmux [deprecated]
git clone https://github.com/tmux/tmux.git [newest source]
cd tmux

This command will verify if everything is there and that all dependencies are met when compiling from source.

sh autogen.sh

You can then then run ./configure && makeand eithermake installorsudo make install like explained above.

Sources used:
- How to install new tmux 1.8 on Ubuntu 12.10 or 12.04?
- tmux README file

like image 181
marc-andre benoit Avatar answered Nov 03 '22 02:11

marc-andre benoit