debian上安裝tmux


1、安裝ncurses庫

  1.1、獲取源碼  

wget https://invisible-island.net/datafiles/release/ncurses.tar.gz
tar xvf ncurses.tar.gz
cd ~/ncurses-6.1        

  1.2、進行配置

./configure

  1.3、編譯

make -j4

  1.4、安裝

sudo make install

 

2、安裝libevent庫

  2.1、獲取源碼  

git clone https://github.com/libevent/libevent.git
cd libevent 

  2.2、進行配置

./autogen.sh
./configure --disable-samples

  2.3、編譯

make -j4

  2.4、安裝

sudo make install

3、安裝tmux庫

  3.1、獲取源碼  

git clone https://github.com/tmux/tmux.git
cd tmux

  3.2、生成配置

    3.2.1、需要先安裝pkg-config

sudo apt-get install pkg-config

      否則會報如下錯誤:

  

configure.ac:91: error: possibly undefined macro: AC_SEARCH_LIBS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
autoreconf failed

   3.2.2、生成配置

./autogen.sh

  3.3、進行配置

./configure CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"

  3.4、編譯

   3.4.1、如果缺乏yacc的話,編譯的時候會報錯

yacc: command not found
Makefile:833: recipe for target 'cmd-parse.c' failed tmux

      可用采用如下命令安裝:

sudo apt-get install byacc

    3.4.2、執行編譯

make -j4

  3.5、安裝

sudo make install

  3.6、共享庫設置

su #必須要用root用戶才可執行下面命令
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM