Skip to content

Instantly share code, notes, and snippets.

@etiennepouliot
Last active May 27, 2020 05:17
Show Gist options
  • Save etiennepouliot/07923e90c4072d72c5ac2b92ec3caf4f to your computer and use it in GitHub Desktop.
Save etiennepouliot/07923e90c4072d72c5ac2b92ec3caf4f to your computer and use it in GitHub Desktop.
Install tmux 2.7 locally on RHEL/CentOS 7
#This will tmux 2.7 in ~/local
wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar xf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=$HOME/local --disable-shared
make install
cd ..
wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
tar xf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --prefix=$HOME/local --disable-shared
make install
cd ..
wget https://github.com/tmux/tmux/releases/download/2.7/tmux-2.7.tar.gz
tar xf tmux-2.7.tar.gz
cd tmux-2.7
./configure --prefix=$HOME/local CFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-L$HOME/local/lib"
make install
export LD_LIBRARY_PATH=$HOME/local/lib"
alias tmux=~/local/bin/tmux
@diego898
Copy link

I replaced ~/local with ~/bin but when I try to run tmux I get:

/home/mesada/bin/bin/tmux: error while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such file or directory

@etiennepouliot
Copy link
Author

Forgot to include "export LD_LIBRARY_PATH=$HOME/local/lib"

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