1. 程式人生 > >debian下如何源碼安裝tmux

debian下如何源碼安裝tmux

usr 編譯 net 目錄 eve tar isl 如何 home

一.源碼安裝ncurses庫

  1.1 獲取源碼

    wget https://invisible-island.net/datafiles/release/ncurses.tar.gz

    tar xvf ncurses.tar.gz ~/

    cd ~/ncurses-6.1

  1.2 生成配置

    ./autogen.sh

  1.3 進行配置(安裝到家目錄的ncurses目錄下)

    ./configure --prefix=/home/jello/ncurses

  1.4 編譯

    make -j4

  1.5 安裝

    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

    

debian下如何源碼安裝tmux