-
-
Save hiwonjoon/457b8dad1eaaca64f28ece7884efc727 to your computer and use it in GitHub Desktop.
Install tmux without root
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
TMUX_VERSION=2.4 | |
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" ./configure --prefix=$HOME/.local | |
make install |
Thanks for this!
As for me, in case anyone got ncurses not found error at initial attempt, make sure to add CFLAGS="-I$HOME/.local/include -I$HOME/.local/include/ncurses"
on line 30.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If it tells you events.h not found,
like in here:
tmux/tmux#1084
make sure you add $HOME/.local/lib64
LDFLAGS="-static -L$HOME/.local/lib -L$HOME/.local/lib64"
on line 30.
It happened for me.