Help us understand the problem. What is going on with this article?

tmuxをローカルインストールする時のメモ

More than 1 year has passed since last update.

tmuxのビルドにはlibevent2が必要なのだが、Cenなんとか7の時代になってもまだリポジトリにないままである。
libevent1ならあるが、これではmakeしたときに定数の未定義エラーが出る。
ふっっっるいCenほにゃららとかいうOS使うと、そもそもlibevent無い時あるよねー。

cd
mkdir local
cd local
mkdir src
cd src
# Get&build libevent
wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar zxf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=${HOME}/local
make
make install
# Get & build ncurses
wget ftp://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz
tar zxf ncurses-6.0.tar.gz
cd ncurses-6.0
./configure --enable-pc-files --prefix=${HOME}/local --with-pkg-config-libdir=${HOME}/local/lib/pkgconfig --with-termlib
make
make install
# Get tmux
wget https://github.com/tmux/tmux/releases/download/2.6/tmux-2.6.tar.gz
tar zxf tmux-2.6.tar.gz
cd tmux-2.6
PKG_CONFIG_PATH=${HOME}/local/lib/pkgconfig ./configure --prefix=${HOME}/local
make
make install

libeventはpkg-configできるようにpcファイルを作成してくれるので、ありがたく使わせて頂く。
ncursesは--enable-pc-filesでpcファイルを作成してくれる。
tmuxバイナリは$HOME/local/binに入る。

新しいバージョンが出るたびにstaticビルドを試してみるのだが、LDパスが上手く通らず、いつもmakeに失敗してしまう。結局はいつも--enable-staticを削除してビルドを通し、tmux起動時にライブラリの場所を教えてあげることで解決している。

export LD_LIBRARY_PATH=${HOME}/local/lib:$LD_LIBRARY_PATH
makisyu
Give me a cup of coffee or tea, not beer. Mainly Ph.D student learning bioinformatics, sometimes infrastructure and cloud engineer
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした