See the Elephant

1992生まれのプログラマが書くエンジニアブログ

mac sierra, tmux で '~/.tmux/plugins/tpm/tpm' returned 127 (pluginがうまく動かない)

tmuxのpluginがうまく動かない

これを動かしたかった.

tech.quartetcom.co.jp

僕の.tmux.conf はこんなの

一部抜粋

# tmuxのセッションを保存する
# prefix C-s : セッション保存
# prefix C-r : セッション復元
# see : http://tech.quartetcom.co.jp/2016/01/15/tmux-continuum/
set -g @tpm_plugins 'tmux-plugins/tpm'
set -g @tpm_plugins 'tmux-plugins/tmux-resurrect'
set -g @tpm_plugins 'tmux-plugins/tmux-sensible'

# resurrect
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-processes 'irb pry "~rails server" "~rails console" mysql ssh php'

# continuum
set -g @continuum-restore 'on'

# tmux内でopenコマンドが使えるようにする
# これをやらないとうまく動かない
# brew install reattach-to-user-namespace

set -g default-command "reattach-to-user-namespace -l ${SHELL}"

run-shell '~/.tmux/plugins/tpm/tpm'

<prefix>r でconfファイルをリロードすると以下のエラーが出る

'~/.tmux/plugins/tpm/tpm' returned 127

本家のissue を見るとどうやら ElCapitanあたりで行われたpermission変更の影響を受けているらしい.

I get error 127 when trying to install. · Issue #67 · tmux-plugins/tpm · GitHub

このコメントによると

I get error 127 when trying to install. · Issue #67 · tmux-plugins/tpm · GitHub

システムのプロテクション切ると使えるとのこと. これは辛いのでやめておこう.