Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tmux is a "terminal multiplexer", it enables a number of terminals to be accessed and controlled from a single terminal.
If you use Debian/Ubuntu, you can just run apt-get install tmux, and voila.
Since the title was about centos 7, then do the following step to install tmux.
(1). tmux has a library dependency on libevent which, of course, isn’t installed by default.
$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
$ tar xzvf libevent-2.0.21-stable.tar.gz
$ cd libevent-2.0.21-stable
$ ./configure && make
$ sudo make install
(2). To get and build the latest from version control:
$ git clone https://github.com/tmux/tmux.git
$ cd tmux
$ sh autogen.sh
$ ./configure && make
Tips:
1. During the second step, if you encounter with "libevent not found” error"
You should install the libevent development package, by running the following command.
$ yum install libevent-devel
2. If you run with "curses not found" error
To compile the code you need the devel packages, run the following comamnd
$ yum install ncurses-devel
$ yum install glibc-static
@MorganGeek

This comment has been minimized.

Copy link

@MorganGeek MorganGeek commented Nov 18, 2016

Tips : By using epel-release you can install tmux via yum
yum install epel-release
yum install tmux

@nikked

This comment has been minimized.

Copy link

@nikked nikked commented Dec 27, 2016

Thanks Root-Shady and MorganGeek!

You helped me out 😄

Cheers!

@patoshii

This comment has been minimized.

Copy link

@patoshii patoshii commented Dec 29, 2016

how do you use epel-release ? when i do a: yum install epel-release --- im getting error nothing to do.

@ygeo

This comment has been minimized.

Copy link

@ygeo ygeo commented May 9, 2017

		# start ::: how-to build tmux from source on older boxes ?!
		# mkdir -p /tmp/tmux-install; cd /tmp/tmux-install
		# wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
		# tar xzvf libevent-2.0.21-stable.tar.gz
		# cd libevent-2.0.21-stable
		# ./configure && make
		# sudo make install
		# # on GentOS
		# sudo yum install -y ncurses-devel
		# # or Ubuntu
		# sudo apt-get install -y ncurses-dev
		# # clone the latest stable master branch version
		# git clone https://github.com/tmux/tmux.git
		# cd tmux/
		# sh autogen.sh
		# /configure && make
		# # and verify 
		# which tmux 
		# tmux -V
		# stop  ::: how-to build tmux from source on older boxes ?!
		#
		# v1.1.2
		# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
		# mkdir -p ~/.tmux/plugins
		# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
		# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tmux-copycat
		##  and verify by:
		# find ~/.tmux/plugins -type d -maxdepth 2
		## stdout should look like
		# ~/.tmux/plugins/
		# ~/.tmux/plugins/tpm
		# ~/.tmux/plugins/tmux-copycat
@liasica

This comment has been minimized.

Copy link

@liasica liasica commented Jun 6, 2018

tmux: error while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such file or directory
ls /usr/local/lib/libevent-2.1.so.6
ln -s /usr/local/lib/libevent-2.1.so.6 /usr/lib64/libevent-2.1.so.6

@trideeprath

This comment has been minimized.

Copy link

@trideeprath trideeprath commented Aug 22, 2018

You can install tmux on centos 7 using the following command
yum install tmux

@haidangwa

This comment has been minimized.

Copy link

@haidangwa haidangwa commented Mar 10, 2019

I used the IUS Community repo and it installed fine for me: https://centos.pkgs.org/7/ius-x86_64/tmux2u-2.8-1.ius.centos7.x86_64.rpm.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment