New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib #18760

Closed
stevensacks opened this Issue Apr 9, 2018 · 20 comments

Comments

Projects
None yet
@stevensacks
Copy link

stevensacks commented Apr 9, 2018

I get the following error when I try to build my react native app in XCode:

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

All of the things I've found on google talk about reinstalling node using homebrew. However, I'm not using node via Homebrew, my node is installed via nvm.

Any help would be much appreciated.

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 9.9.0
Yarn: 1.3.2
npm: 5.7.1
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: Not Found

Packages: (wanted => installed)
react: ^16.3.1 => 16.3.1
react-native: ^0.55.1 => 0.55.1

Steps to Reproduce

This is a project which builds fine on my client's machine and my laptop. It is only not working on my desktop computer.

Expected Behavior

I thought it would build.

Actual Behavior

It doesn't build because of the above error.

@react-native-bot

This comment has been minimized.

Copy link
Collaborator

react-native-bot commented Apr 9, 2018

Thanks for posting this! It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out?

If you believe your issue contains all the relevant information, let us know in order to have a maintainer remove the No Template label. Thank you for your contributions.

How to ContributeWhat to Expect from Maintainers

@react-native-bot

This comment has been minimized.

Copy link
Collaborator

react-native-bot commented Apr 9, 2018

Thanks for posting this! It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest release, v0.55?

Thank you for your contributions.

@stevensacks

This comment has been minimized.

Copy link

stevensacks commented Apr 9, 2018

Yes.

@stevensacks

This comment has been minimized.

Copy link

stevensacks commented Apr 9, 2018

I have tried completely uninstalling and reinstalling node. I have tried reinstalling icu4c manually. I have tried older versions of node, I have tried the latest version of node 9.11.1. I have updated my chown permissions. I have tried everything I could find on google related to this error. Nothing works.

@react-native-bot

This comment has been minimized.

Copy link
Collaborator

react-native-bot commented Apr 9, 2018

This issue looks like a question that would be best asked on Stack Overflow.

Stack Overflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

Will close this as this is really a question that should be asked on Stack Overflow.

@Here21

This comment has been minimized.

Copy link

Here21 commented May 23, 2018

+1
same problem

@weiwanning

This comment has been minimized.

Copy link

weiwanning commented Jun 2, 2018

try npm version and see if you see the same error. If so, try to upgrade your node version brew upgrade npm and

==> Upgrading 1 outdated package, with result:
npm 8.1.2 -> 10.3.0
==> Upgrading npm
==> Installing dependencies for node: icu4c
==> Installing node dependency: icu4c

fixed for me.

@Here21

This comment has been minimized.

Copy link

Here21 commented Jun 5, 2018

I re-install yarn and upgrade my node version with nvm.
then it work again...

I have still don't know what problem happened with it...but it's work again for me.

@Warren-Partridge

This comment has been minimized.

Copy link

Warren-Partridge commented Jun 28, 2018

Hey, so I solved a similar issue just now.

I was using React (not React Native) and was trying to sniff php code, but the error I got took the same form as yours:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib
  Referenced from: /usr/local/opt/php@7.1/bin/php
  Reason: image not found

What solved my issue was updating npm from 5.6.0 to 6.1.0 with npm i -g npm, then reinstalling php with brew reinstall php@7.1.

I'd imagine that doing brew reinstall node would work for you since your error references your node install. But you aren't using homebrew... maybe as a last-ditch effort you could try installing it. I think the problem is likely with your node install though. Hope this helps and good luck!

@ccdwyer

This comment has been minimized.

Copy link

ccdwyer commented Jul 25, 2018

I got a new MBP and did a migration from my old one, but was getting this error while building my app for android. Doing the following worked for me:

sudo chown -R $(whoami) /usr/local/Cellar
brew uninstall --force yarn
brew uninstall --force icu4c
brew uninstall --force node
brew install node
brew install yarn
@heshamelmasry77

This comment has been minimized.

Copy link

heshamelmasry77 commented Jul 30, 2018

this is the correct solution:
brew uninstall --ignore-dependencies node icu4c
brew install node
brew link --overwrite node

@melvinhagberg

This comment has been minimized.

Copy link

melvinhagberg commented Aug 5, 2018

Make sure everything is up to date.
Update brew using brew update
Update packages using brew upgrade

Worked for me, had an issue with Laravel Valet and Composer.

@Asmoutcha

This comment has been minimized.

Copy link

Asmoutcha commented Sep 14, 2018

Updating yarn fixed the problem for me brew upgrade yarn

@iarobinson

This comment has been minimized.

Copy link

iarobinson commented Dec 5, 2018

I'm developing a Ruby on Rails application and found the above error. What worked for me was the following:

brew reinstall yarn

@renxinqiang

This comment has been minimized.

Copy link

renxinqiang commented Dec 18, 2018

brew info icu4c
you can see something like this
/usr/local/Cellar/icu4c/63.1 or
/usr/local/Cellar/icu4c/62.1 or
/usr/local/Cellar/icu4c/56.1 or
/usr/local/Cellar/icu4c/58.1

cd /usr/local/Cellar/icu4c/58.1/lib
then
cp ./libicui18n.58.dylib /usr/local/opt/icu4c/lib/

I hope i can help you

@if-jds

This comment has been minimized.

Copy link

if-jds commented Dec 20, 2018

brew update && brew upgrade worked for me. Dependency hell is fun.

@Tyak99

This comment has been minimized.

Copy link

Tyak99 commented Jan 2, 2019

Dear future person searching to fix this problem. brew update & brew upgrade worked for me too!! Haha

@LarryWachira

This comment has been minimized.

Copy link

LarryWachira commented Jan 12, 2019

@renxinqiang Thanks! Worked like a charm.

@geshanshan6

This comment has been minimized.

Copy link

geshanshan6 commented Jan 15, 2019

brew cleanup

@muhammadkounta

This comment has been minimized.

Copy link

muhammadkounta commented Jan 21, 2019

brew update && brew upgrade worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment