一.源碼安裝ncurses庫git
1.1 獲取源碼github
wget https://invisible-island.net/datafiles/release/ncurses.tar.gzspa
tar xvf ncurses.tar.gz ~/.net
cd ~/ncurses-6.1get
1.2 進行配置(安裝到家目錄的ncurses目錄下)源碼
./configure --prefix=/home/jello/ncurses it
1.3 編譯編譯
make -j4event
1.4 安裝配置
make install
libtool --finish ~/ncurses/lib
二.源碼安裝libevent庫
2.1 獲取源碼
git clone https://github.com/libevent/libevent.git ~/libevent
cd ~/libevent
2.2 生成配置
./autogen.sh
2.3 進行配置(安裝到家目錄的libevent目錄下,--disable-samples不編譯樣例程序)
./configure --prefix=/home/jello/libevent --disable-samples
2.4 編譯
make -j4
2.5 安裝
make install
libtool --finish ~/libevent/lib
三.源碼安裝tmux
3.1 獲取源碼
git clone https://github.com/tmux/tmux.git ~/tmux
cd ~/tmux
3.2 生成配置
./autogen.sh
3.3 進行配置(安裝到家目錄的tmux目錄下)
./configure --prefix=/home/jello/tmux CFLAGS="-I/usr/local/include -I/home/jello/libevent/include -I/home/jello/ncurses/include" LDFLAGS="-L/usr/local/lib -L/home/jello/libevent/lib -L/home/jello/ncurses/lib"
3.4 編譯
make -j4
3.5 安裝
make install
3.6 指定共享庫的搜索路徑
export LD_LIBRARY_PATH=/home/jello/libevent/lib:/home/jello/ncurses/lib:$LD_LIBRARY_PATH