0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Macでnode.js関連のものが動かなくなったときの対処

Posted at

経緯

node.jsのツールを使っていたのだが、brew install gitでgitのバージョンが新しくなるーみたいな情報でやった後、nodeコマンドが使えなくなった。

% swagger-merger xxxx
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.67.dylib
  Referenced from: /usr/local/bin/node
  Reason: image not found
zsh: abort      swagger-merger 

対応

とりあえずエラーメッセージでググると
https://qiita.com/SuguruOoki/items/3f4fb307861fcedda7a5
が出てきて解決。

以下のコマンドを実行すると直った。

% brew upgrade node 
% brew reinstall node

原因(多分)

macOSでは、libicucore.dylib というライブラリが提供されていて、icu4cをインストールする必要がなくなっているらしいのだが、brewでgitを再インストールしたときに色々ダウンロードしてたから、勢いでicu4cも入れちゃった?
知らんけど。

とりあえず、brewで再度node.jsをインストールすることで、正しいライブラリの参照が作り直されたんだろうな。
多分だけど。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?