Skip to content

Instantly share code, notes, and snippets.

@RedPointyJackson
Last active June 11, 2017 19:42
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 RedPointyJackson/478ec59f70eb01075b2a1337cd72d9df to your computer and use it in GitHub Desktop.
Save RedPointyJackson/478ec59f70eb01075b2a1337cd72d9df to your computer and use it in GitHub Desktop.
Install tmux without root privileges
#!/bin/sh
# libevent
wget -O libevent.tar.gz 'https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz'
tar xvf libevent.tar.gz
cd 'libevent-2.1.8-stable'
./configure --prefix=${HOME} --disable-shared
make
make install
cd ..
# Ncurses
wget -O ncurses.tar.gz ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz
tar xvf ncurses.tar.gz
cd 'ncurses-5.9'
./configure --prefix=${HOME}
make
make install
cd ..
# tmux
wget -O tmux.tar.gz 'https://github.com/tmux/tmux/releases/download/2.5/tmux-2.5.tar.gz'
tar xvf tmux.tar.gz
cd 'tmux-2.5'
./configure CFLAGS="-I$HOME/include -I$HOME/include/ncurses" LDFLAGS="-L$HOME/lib -L$HOME/include/ncurses -L$HOME/include"
CPPFLAGS="-I$HOME/include -I$HOME/include/ncurses" LDFLAGS="-static -L$HOME/include -L$HOME/include/ncurses -L$HOME/lib" make
cp tmux $HOME/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment