I am trying to install tmux on my working environment, but due to IT’s policy, I was not able to used sudo to complete the process of tmux installation. so I found a way the solved this problem without sudo command.
Prepared (1) libevent (2) ncurses and (3) tmux
Step 1, Install libevent
# untar libevent and install
tar xvzf libevent-*.tar.gz
cd libevent-*-stable
./configure --prefix=$HOME/local --disable-shared
make
make install
cd ..
Step 2, Install ncurses
# untar libevent and install
tar xvzf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --prefix=$HOME/local
make
make install
cd ..
Step 3, Install tmux
tar xvzf tmux-*.tar.gz
cd tmux-*
./configure CFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-L$HOME/local/lib -L$HOME/local/include/ncurses -L$HOME/local/include"
CPPFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-static -L$HOME/local/include -L$HOME/local/include/ncurses -L$HOME/local/lib"
make
cp tmux $HOME/local/bin
cd ..
You could find tmux in $/home/local/bin, and execute it.