自從OSX升到Sierra以來,我萬年沒更新的homebrew與tmux每天都在噴錯誤訊息給我,今天發現要寫一些tmux customizing script沒辦法運作,只好面對現實處理一下。以下幾點紀錄供未來參考用。
症頭:brew update => /usr/local is not writable.
解法:更新homebrew
如果跑brew doctor
,homebrew會建議跑chown -R ${whoami} /usr/local
,但我的情況是這招沒用,有查到一些討論串說這是Sierra開始有的bug。後來是直接安裝新版的homebrew解決。寫這篇文章的當下,官網提供的命令為:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
過程中會提示刪除一些東西,按照指示刪除後再跑一次brew update
就行了。
症頭:[warn]: kq_init: detected broken kqueue; not using.: File exists
解法:更新tmux
tmux在2.3以前會有此症,更新就好囉!用homebrew的話就:
brew uninstall --force tmux
brew install --HEAD tmux
症頭:warning: reattach-to-user-namespace: unsupported new OS, trying as if it were 10.10
解法:更新reattach-to-user-namespace module
brew upgrade reattach-to-user-namespace
。詳情請見:https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/issues/52
症頭:invalid or unknown command: bind-key -t vi-copy
解法:用新的語法改寫
用tmux 2.2太久了,一升到2.4就碰到這個問題,所幸有人佛心來著寫了一篇簡單明瞭的轉換教學。以下步驟引用自該文:
- replace
-t
with-T
- replace
vi-
with-mode-vi
- prefix the command with
send-keys -X
( 嗯…這麼一看,基本上都是長期懶得更新的問題啊… )