はじめに
今更ながらMountin LionからMarvericksにアップデートしました。
するとtmuxが使えない現象が起きたので紹介します。
現象
OSアップデート後にtmuxを起動しようとするとこんな感じに。
MacBook-Air:~ user$ tmux a
-bash: tmux: command not found
ん?tmux無い。
findしてみる。
Book-Air:~ user$ sudo find / -name tmux
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/usr/local/Cellar/tmux
/usr/local/Cellar/tmux/1.7/bin/tmux
/usr/local/Cellar/tmux/1.7/etc/bash_completion.d/tmux
/usr/local/etc/bash_completion.d/tmux
/usr/local/Library/LinkedKegs/tmux
完全に消えたわけなじゃない。.tmux.confもあるし...
/usr/local/Cellar/tmux/1.7/bin/tmux
を実行してみるとこんな感じに。結局うまくいかない。
MacBook-Air:~ user$ /usr/local/Cellar/tmux/1.7/bin/tmux
dyld: Library not loaded: /usr/local/lib/libevent-2.0.5.dylib
Referenced from: /usr/local/Cellar/tmux/1.7/bin/tmux
Reason: image not found
Trace/BPT trap: 5
対策
以下の記事と同じ現象だったので参考にさせて頂きました。ありがとうございます。
拝啓、mac mavericksにしてから開発環境が死んだみなさまへ…
http://loudspeaker.sakura.ne.jp/devblog/2014/03/10/reconstruct_developer_env_in_mac_with_mavericks/
brew
で入れなおせばいいらしいです。
解決
以下のコマンドでtmux
インストール
MacBook-Air:~ user$ brew uninstall libevent
MacBook-Air:~ user$ brew uninstall tmux
MacBook-Air:~ user$ brew install tmux
インストール後無事起動を確認。
おわりに
Marveriscksにアップデート後は環境が崩れるケースが多々あるようですね。かなり今更なのでこういう現象が起こる人が少ないとは思いますが、ご参考までにどうぞ。
Yosemiteは早めにアップデートしよう...