あれ?2,3日前までちゃんと動いてたんだけどnodeがエラーになったようなので、その対処をメモ
$ brew doctor Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: node
node をアンインストール
メッセージ通り `brew link` してもエラーが出るので、いいろいろ悩んだ挙句、再インストールすることにしました。
$ brew uninstall npm $ brew uninstall node $ npm uninstall npm -g $ sudo rm -rf /usr/local/lib/node_module $ sudo rm -rf /usr/local/include/node $ sudo rm -rf /usr/local/lib/node
node をアンインストールした状態で、Homebrewが正常に機能しているか確認しておく
$ brew update Already up-to-date. $ brew doctor Your system is ready to brew.
node を再インストール
$ brew install node ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/node-0.10.2 Already downloaded: /Library/Caches/Homebrew/node-0.10.28.mavericks.bottle.tar.gz ==> Pouring node-0.10.28.mavericks.bottle.tar.gz ==> Caveats Bash completion has been installed to: /usr/local/etc/bash_completion.d Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local You can try again using: brew link node Possible conflicting files are: /usr/local/share/man/man1/node.1 /usr/local/lib/dtrace/node.d ==> make install scripts/doc-build.sh doc/api/npm-bin.md man/man3/npm-bin.3 node cli.js install ronn --no-global bash: node: command not found make[1]: *** [node_modules/.bin/ronn] Error 127 make: *** [man/man3/npm-bin.3] Error 2 Warning: The post-install step did not complete successfully You can try again using `brew postinstall node` ==> Summary /usr/local/Cellar/node/0.10.28: 1547 files, 18M
リンク張りなさいということなので、
$ brew link node Linking /usr/local/Cellar/node/0.10.28... Error: Could not symlink share/man/man1/node.1 Target /usr/local/share/man/man1/node.1 already exists. You may want to remove it: rm /usr/local/share/man/man1/node.1
ファイル削除しなさいということなので、
$ rm /usr/local/share/man/man1/node.1 $ brew link node Error: Could not symlink lib/dtrace/node.d Target /usr/local/lib/dtrace/node.d already exists. You may want to remove it: rm /usr/local/lib/dtrace/node.d
ファイル削除しなさいということなので、
$ rm /usr/local/lib/dtrace/node.d $ brew link node Linking /usr/local/Cellar/node/0.10.28... 5 symlinks created
リンクが張れたので、その次の指示どおりに、’brew postinstall node’ する
$ brew postinstall node ==> make install ==> /usr/local/bin/npm update npm -g
うまく行った感じ、確認しておく。
$ brew update Already up-to-date. $ brew doctor Your system is ready to brew.
めでたしめでたし
コメント