Skip to content

Instantly share code, notes, and snippets.

@joegross
Last active August 1, 2019 06:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save joegross/655aa118119b5b02a6d76e052dd7fac7 to your computer and use it in GitHub Desktop.
Save joegross/655aa118119b5b02a6d76e052dd7fac7 to your computer and use it in GitHub Desktop.
Install tmux without root
#!/bin/bash
set -e
TMUX_VERSION=2.2
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
./configure --prefix=$HOME/local
CFLAGS="-I$HOME/local/include" LDFLAGS="-static -L$HOME/local/lib" ./configure --prefix=$HOME/local
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment