8

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.

Yang
  • 7,712
  • 9
  • 48
  • 65
mingchaoyan
  • 8,096
  • 3
  • 23
  • 31
  • 4
    You are compiling, so you need the `-dev` version of the package. Try installing `libevent-dev`. – Chris Johnsen Jun 13 '13 at 03:51
  • thx~ you sovled my problem – mingchaoyan Jun 14 '13 at 07:20
  • As a side note , when using sudo apt-get install .. when you're not sure about the package name to install you can partially write the package name and press the TAB key twice to return all matching packages.. doing sudo apt-get install libevent then TAB twice will get you a nice list.. just try it next time you're not sure.. – marc-andre benoit Feb 13 '14 at 23:08
  • 1
    This question appears to be off-topic because it is about Ubuntu, and appears to be a duplicate of this question on Ask Ubuntu: http://askubuntu.com/questions/273013/how-to-install-new-tmux-1-8-on-ubuntu-12-10-or-12-04 – Brad Larson Feb 21 '14 at 16:52

1 Answers1

11

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

  • 1
    i added an answer for two reasons. first there isnt a proper answer and second,the answer in the question' comments did not fix the problem i had on my part.. as in i was also missing ncurses.. digging more got me the answer.. and a good answer will surely help others :) – marc-andre benoit Feb 13 '14 at 23:06
  • 1
    Pretty sure that you meant `./configure && make`... Not `./configure & make`. Unless you want to configure and make simultaneously, which wouldn't work. – monokrome Apr 20 '14 at 01:54
  • indeed ,typo is now fixed :) – marc-andre benoit Jun 24 '15 at 19:08