1
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.

nvmで「dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib」エラーが出たときの解決方法

Posted at

環境

  • macOS Mojave 10.14.5
  • nvmでnode.jsの導入済み

概要

npmコマンド実行時に以下のエラーが発生する

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
  Referenced from: /usr/local/bin/node
  Reason: image not found
Abort trap: 6

解決方法

.bash_profileに以下の記述が無ければ追加する

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

原因

以下の複合要因と思われる。

原因1

.bash_profileの記述が無かったため、デフォルトでsystemのnodeが使われていた
参考: https://qiita.com/tatama/items/1a6531da8f69dab0b3b5

原因2

恐らくbrew upgradeをしたのが第2の原因。
その際にsystemの古いバージョンのnodeと、新しいバージョンのnodeが相互干渉を引き起こしたと思われる
参考: https://qiita.com/SuguruOoki/items/3f4fb307861fcedda7a5

余談

mysqlのバージョンも勝手に上がって開発環境が壊れた(mysql5.7からmysql8.0になってた)ので、あまり気軽にbrew upgradeはしない方が良いかもしれない・・

1
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
1
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?