Skip to content

Instantly share code, notes, and snippets.

@renxida
Forked from hiwonjoon/build_local_tmux.sh
Last active June 4, 2018 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renxida/78fdc5c9e1481f8d80391afccce11dda to your computer and use it in GitHub Desktop.
Save renxida/78fdc5c9e1481f8d80391afccce11dda to your computer and use it in GitHub Desktop.
Install tmux without root
#!/bin/bash
set -e
TMUX_VERSION=2.7
LIBEVENT_VERSION=2.0.22-stable
NCURSES_VERSION=6.0
mkdir -p $HOME/.local
mkdir -p $HOME/src
cd $HOME/src
wget -N https://github.com/libevent/libevent/releases/download/release-$LIBEVENT_VERSION/libevent-$LIBEVENT_VERSION.tar.gz
tar -xzf libevent-$LIBEVENT_VERSION.tar.gz
cd libevent-$LIBEVENT_VERSION
./configure --prefix=$HOME/.local
make install
cd $HOME/src
wget -N https://ftp.gnu.org/pub/gnu/ncurses/ncurses-$NCURSES_VERSION.tar.gz
tar -xzf ncurses-$NCURSES_VERSION.tar.gz
cd ncurses-$NCURSES_VERSION
./configure CPPFLAGS="-P" --prefix=$HOME/.local
make install
cd $HOME/src
wget -N https://github.com/tmux/tmux/releases/download/$TMUX_VERSION/tmux-$TMUX_VERSION.tar.gz
tar -xzf tmux-$TMUX_VERSION.tar.gz
cd tmux-$TMUX_VERSION
CFLAGS="-I$HOME/.local/include" LDFLAGS="-static -L$HOME/.local/lib -L$HOME/.local/lib64" ./configure --prefix=$HOME/.local
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment