tmux インストール時のエラー
環境
- OS X 10.11.6
エラー内容
Homebrew でインストールした tmux を起動するとエラーが発生
$ tmux dyld: lazy symbol binding failed: Symbol not found: _clock_gettime Referenced from: /usr/local/opt/libevent/lib/libevent-2.0.5.dylib Expected in: flat namespace dyld: Symbol not found: _clock_gettime Referenced from: /usr/local/opt/libevent/lib/libevent-2.0.5.dylib Expected in: flat namespace Trace/BPT trap: 5 Makoto-Air:memo_md makoto$ brew remove tmux Uninstalling /usr/local/Cellar/tmux/2.2... (9 files, 639.7K)
解決方法
Homebrew を update して、再度インストールする
$ brew update
brew update 時に発生したエラーとその対処方法
根本的な解決作は上記の通り brew の update ですが、update 実行時にいくらかエラーが起きました。
エラーその1
内容
$ brew update Error: /usr/local must be writable!
解決方法
/usr/local
以下のパーミッションを変更する
素人がEl Capitanにアップデートしてみたやつ。 - Qiita
$ sudo chown -R $(whoami):admin /usr/local
エラーその2
内容
$ brew update /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory /usr/local/Library/brew.sh: line 32: /usr/local/Library/ENV/scm/git: No such file or directory Error: update-report should not be called directly!
解決方法
brew prune
を行う
$ brew prune Pruned 0 symbolic links and 2 directories from /usr/local
蛇足
ついでに、サブコマンドのコマンド入力補完設定方法をメモっておく
completion の ソース入手
$ curl https://raw.githubusercontent.com/Bash-it/bash-it/master/completion/available/tmux.completion.bash > ~/.tmux.completion.bash
~/.bash_profile
に編集
source ~/.tmux.completion.bash