How to fix this [error]? — dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.73.dylib Referenced from: /usr/local/bin/node Reason: image not found [1] 12774 abort node

hipster' Santos
2 min readJul 12, 2024

--

The error you’re encountering with Node.js is due to a missing dynamic library libicui18n.73.dylib, which is part of the ICU (International Components for Unicode) library.

To fix this, you can try the following steps:

  1. Reinstall ICU4C via Homebrew: If you’re using Homebrew, you can reinstall the ICU4C library to ensure that the required files are present.
brew reinstall icu4c

Ensure Homebrew Paths are Correct: Make sure that Homebrew’s paths are correctly set in your environment. You can add them to your shell configuration file (~/.bashrc, ~/.zshrc, etc.).

echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc
echo 'export LDFLAGS="-L/usr/local/opt/icu4c/lib"' >> ~/.zshrc
echo 'export CPPFLAGS="-I/usr/local/opt/icu4c/include"' >> ~/.zshrc
source ~/.zshrc

Reinstall Node.js using NVM: If the issue persists, reinstall Node.js using NVM to ensure that it is correctly linked to the ICU libraries.


Reinstall Node.js using NVM:
If the issue persists, reinstall Node.js using NVM to ensure that it is correctly linked to the ICU libraries.

nvm reinstall node

Check for Brew Warnings and Resolve Them: Sometimes, Homebrew might have some warnings or issues that need to be resolved. Run the following command to check for them:

brew doctor

Symlink the Library: If the specific library version is missing, you can try creating a symlink to the existing version of the library.

ln -s /usr/local/opt/icu4c/lib/libicui18n.dylib /usr/local/opt/icu4c/lib/libicui18n.73.dylib

By following these steps, you should be able to resolve the issue with the missing libicui18n.73.dylib library and get Node.js working correctly again. If the problem persists, you might need to look into further details of your Node.js installation or consider using a different method to manage your Node.js versions and dependencies.

--

--

hipster' Santos
hipster' Santos

Written by hipster' Santos

Fullstack developer , Distributed system engineer,Competitive programmer find at https://github.com/HipsterSantos

No responses yet