zoukankan      html  css  js  c++  java
  • 无root权限安装tmux

    1.先安装libevent库,去官网下载对应的库文件,然后解压

     $ cd libevent-2.1.11-stable
     $ ./configure --prefix=/home/zhiyangh/usr/lib/libevent
     $ make && make install

    2. 安装tmux

        在安装的时候需要指定libevent的库

        $ LIBEVENT_PATH=/home/zhiyangh/usr/lib/libevent
        $ ./configure --prefix=/home/zhiyangh/usr/lib/tmux CFLAGS="-I$LIBEVENT_PATH/include" LDFLAGS="-L$LIBEVENT_PATH/lib"
        $  make && make install

    3. 这个时候去tmux安装目录下运行./tmux还是会报找不到

        ./tmux: error while loading shared libraries: libevent-2.1.so.7: cannot open shared object file: No such file or directory

        需要将安装的libevent配置到环境变量里面去

        例如:

        在~/.bashrc里面写上 export LD_LIBRARY_PATH=/home/zhiyangh/usr/lib/libevent/lib/:$LD_LIBRARY_PATH

    4.另外为了避免每次启动terminal后都要手动运行tmux, 可以在~/.bashrc中增加一行, 这样就可以在打开终端时默认启动tmux: 

    [[ $TERM != "screen" ]] && exec tmux
  • 相关阅读:
    nyoj67三角形面积
    hduoj1097A hard puzzle
    nyoj168房间安排
    nyoj73 比大小
    hduoj1021 Fibonacci Again
    hduoj1018 Big Number
    hduoj1108最小公倍数
    nyoj312 20岁生日
    hduoj1019 Least Common Multiple
    nyoj144小珂的苦恼
  • 原文地址:https://www.cnblogs.com/kent-hu/p/11608080.html
Copyright © 2011-2022 走看看