Skip to content

Instantly share code, notes, and snippets.

@relaxdiego
Forked from rothgar/install-tmux
Last active December 7, 2021 16:09
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save relaxdiego/273d511cb156d2c7d0171a0ccaa5ab2b to your computer and use it in GitHub Desktop.
Save relaxdiego/273d511cb156d2c7d0171a0ccaa5ab2b to your computer and use it in GitHub Desktop.
Install tmux 2.2 on CentOS 7.1
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
make
sudo make install
# DOWNLOAD SOURCES FOR TMUX AND MAKE AND INSTALL
wget https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz
tar -xvzf tmux-2.2.tar.gz
cd tmux-2.2
LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" ./configure --prefix=/usr/local
make
sudo make install
# pkill tmux
# close your terminal window (flushes cached tmux executable)
# open new shell and check tmux version
tmux -V
Copy link

ghost commented Apr 27, 2017

libevent and libevent-devel should be added to the # install deps part, so one would save the procedure of manually building libevent. If libevent-devel is missing, an error while executing ./configure could occur

now tmux 2.4 can be used instead of tmux 2.2

@jeroen-dhollander
Copy link

Thank you so much for this information.

FYI These same steps also work for tmux 2.7

wget https://github.com/tmux/tmux/releases/download/2.7/tmux-2.7.tar.gz

@zqwei
Copy link

zqwei commented May 24, 2019

I will second @ghost no need to compile libevent
do

# install deps
yum install gcc kernel-devel make ncurses-devel libevent-devel

also unzip the file to /tmp/ in case sudo make install does not work for certain user permission.

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