macOSX Hish sierraにアップデート後にvimが起動しない件について
先日、macOSXにアップデートした後にvimを起動した所、以下のエラーで起動不能となっていました。
dyld: Library not loaded: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib Referenced from: /usr/local/bin/vim Reason: image not found Abort trap: 6
どうも、homebrewでinstallしている場合は、macvimをアップデートする必要があるとのことなのでアップデートするとまたもエラーが、、
$brew upgrade macvim ** BUILD FAILED ** The following build commands failed: StripNIB English.lproj/MainMenu.nib (1 failure) make[1]: *** [macvim] Error 65 make: *** [first] Error 2 READ THIS: https://docs.brew.sh/Troubleshooting.html Error: GitHub The GitHub credentials in the macOS keychain may be invalid. Clear them with: printf "protocol=https\nhost=github.com\n" | git credential-osxkeychain erase Or create a personal access token: https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"
メッセージの通り、キーチェイン内のgitに関する認証が無効になっているようなので、以下の操作で一度削除してからgit configにkeychainの情報を設定します。
$ printf "protocol=https\nhost=github.com\n" | git credential-osxkeychain erase
これで、リトライするとまたエラーが・・
$ brew upgrade macvim +[master] Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> Updated Formulae solr solr@5.5 ==> Deleted Formulae solr@5.4 ==> Upgrading 1 outdated package, with result: macvim 8.0-138 ==> Upgrading macvim --with-lua ==> Downloading https://github.com/macvim-dev/macvim/archive/snapshot-138.tar.gz Already downloaded: /Users/k-goto/Library/Caches/Homebrew/macvim-8.0-138.tar.gz ==> ./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-rubyinterp --enable-tclinterp --enable-terminal --with-tlib=ncurses --with-compiledby=Homebrew --with-local-dir=/usr/local --enable-cscope --enable-luainterp --with-lua-prefix=/usr/local/opt/lua --enable-python ==> make Last 15 lines from /Users/k-goto/Library/Logs/Homebrew/macvim/02.make: cd /tmp/macvim-20171016-46768-q6ljo1/macvim-snapshot-138/src/MacVim builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /tmp/macvim-20171016-46768-q6ljo1/macvim-snapshot-138/src/MacVim/icons/MacVim.icns /tmp/macvim-20171016-46768-q6ljo1/macvim-snapshot-138/src/MacVim/build/Release/MacVim.app/Contents/Resources CopyPlistFile build/Release/MacVim.app/Contents/Resources/KeyBinding.plist KeyBinding.plist cd /tmp/macvim-20171016-46768-q6ljo1/macvim-snapshot-138/src/MacVim builtin-copyPlist --outdir /tmp/macvim-20171016-46768-q6ljo1/macvim-snapshot-138/src/MacVim/build/Release/MacVim.app/Contents/Resources -- KeyBinding.plist ** BUILD FAILED ** The following build commands failed: StripNIB English.lproj/Preferences.nib (1 failure) make[1]: *** [macvim] Error 65 make: *** [first] Error 2
xcodeが更新されていなかったので、更新してリトライしたところ、以下の通り正常にインストールできました。
Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> Updated Formulae faac imagemagick@6 menhir snort ==> Upgrading 1 outdated package, with result: macvim 8.0-138 ==> Upgrading macvim --with-lua ==> Downloading https://github.com/macvim-dev/macvim/archive/snapshot-138.tar.gz Already downloaded: /Users/k-goto/Library/Caches/Homebrew/macvim-8.0-138.tar.gz ==> ./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-rubyinterp --enable-tclinterp --enable-terminal --with-tlib=ncurses --with-compiledby=Homebrew --with-local-dir=/usr/local --enable-cscope --enable-luainterp --with-lua-prefix=/usr/local/opt/lua --enable-python ==> make /usr/local/Cellar/macvim/8.0-138: 2,139 files, 34.1MB, built in 3 minutes 1 second
MacはOSの更新が入る度に色々と動かないものが出るので、時間のある時にアップデートするようにしないといけないですね。