Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

How to solve dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

brew uninstall --ignore-dependencies node icu4c
brew install node
@trainoasis

This comment has been minimized.

Copy link

commented May 18, 2018

Heya. This doesn't solve my issue by itself unfortunately :) While reinstalling node this pops up:

==> Pouring node-10.1.0.high_sierra.bottle.tar.gz Error: The "brew link" step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/node
Target /usr/local/bin/node
is a symlink belonging to node. You can unlink it:
brew unlink node

To force the link and overwrite all conflicting files:
brew link --overwrite node

Gotta run brew link --overwrite node to make it work.

@dyslexicdev

This comment has been minimized.

Copy link

commented Jul 13, 2018

this worked for me, thanks :)

@csierra15

This comment has been minimized.

Copy link

commented Jul 16, 2018

Also worked for me! Thank you! :)

@williamnvk

This comment has been minimized.

Copy link

commented Jul 16, 2018

Thank you, this worked for me.

@annasedlar

This comment has been minimized.

Copy link

commented Jul 20, 2018

Thank you, also works for me!

@romellem

This comment has been minimized.

Copy link

commented Jul 26, 2018

Thanks, this worked. In my case, I use a versioned node, node@8, so I had to just run

brew uninstall --ignore-dependencies node@8 icu4c
brew install node@8
@Royaljerry

This comment has been minimized.

Copy link

commented Aug 10, 2018

node@8 solution worked 4 me, thx

@cuonghuynh

This comment has been minimized.

Copy link

commented Aug 28, 2018

it worked for me, thank you.

@itsterry

This comment has been minimized.

Copy link

commented Aug 31, 2018

Worked for me too: thank you!

@PengYilong

This comment has been minimized.

Copy link

commented Sep 10, 2018

thanks

@PengYilong

This comment has been minimized.

Copy link

commented Sep 10, 2018

I reinstall php with brew reinstall php@7.1 to solve this problem.

@arctouch-fabriciomiranda

This comment has been minimized.

Copy link

commented Sep 19, 2018

Thanks! brew link --overwrite node solved!

@MilosJo

This comment has been minimized.

Copy link

commented Sep 20, 2018

Thanks, solved my issue!

@JulienCorb

This comment has been minimized.

Copy link

commented Sep 23, 2018

I had multiple versions of icu4c, so I had to run brew uninstall --force icu4c before reinstalling node. Then it worked perfectly for me.

@yakzmoz2014

This comment has been minimized.

Copy link

commented Sep 25, 2018

It works for me, thanks.

@Silverium

This comment has been minimized.

Copy link

commented Oct 17, 2018

+1

@RudolfHladik

This comment has been minimized.

Copy link

commented Nov 29, 2018

node@8 worked for me too, thanks.

@yahilmadakiya

This comment has been minimized.

Copy link

commented Nov 30, 2018

It works for me, thanks.

@obax

This comment has been minimized.

Copy link

commented Dec 2, 2018

Nice one

@joncasdam

This comment has been minimized.

Copy link

commented Dec 4, 2018

Confirming that still works. Thanks.

@rbucks

This comment has been minimized.

Copy link

commented Dec 5, 2018

This was such a weird error. Thank you internet.

@jeporcher

This comment has been minimized.

Copy link

commented Dec 10, 2018

Thanks a lot for this!

@dariogomez

This comment has been minimized.

Copy link

commented Dec 10, 2018

thanks for this!

@BahodurSaidov

This comment has been minimized.

Copy link

commented Dec 12, 2018

brew reinstall php@7.1

thanks for mentioning that ! i had laravel valet with php@7.1 and did brew reinstall php which didn't solve the issue...

@mattSpell

This comment has been minimized.

Copy link

commented Dec 12, 2018

+1 👍

@snez

This comment has been minimized.

Copy link

commented Dec 17, 2018

I had an old manually linked version of php 5.6 under /usr/local/bin/php, so php broke when I upgraded to 7.2. Deleting the old symlink allowed the newer PHP version to kick in.

@MikeyBeLike

This comment has been minimized.

Copy link

commented Dec 22, 2018

Thanks!

@khendraw

This comment has been minimized.

Copy link

commented Dec 26, 2018

Thank you. This confirmed works.

@carlosvazquez

This comment has been minimized.

Copy link

commented Dec 28, 2018

brew reinstall php@7.1
or
brew reinstall php@7.2

I think the problem is with php.

@MaffooBristol

This comment has been minimized.

Copy link

commented Jan 7, 2019

I concur that my issue was with php, with both php and composer commands failing with this issue. Anyone have any idea what could've changed? I don't recall really doing anything to break it recently; it appears to have done it of its own accord.

Either way, brew reinstall php@7.2 worked for me

@CAWeissen

This comment has been minimized.

Copy link

commented Jan 8, 2019

brew reinstall php@7.2 worked for me as well!

@peacemoon

This comment has been minimized.

Copy link

commented Jan 9, 2019

brew reinstall php@7.2 worked for me as well!

@tanthammar

This comment has been minimized.

Copy link

commented Jan 10, 2019

I got this problem when I installed php 7.3
The solution solved my issue.

@natenolting

This comment has been minimized.

Copy link

commented Jan 11, 2019

Worked for me too!

@shozayen

This comment has been minimized.

Copy link

commented Jan 13, 2019

Thanks, worked for me

@rakesh-verma-16

This comment has been minimized.

Copy link

commented Jan 15, 2019

Worked for me too. Much thanks <3

@raymondtay

This comment has been minimized.

Copy link

commented Jan 17, 2019

good tip, thanks for the contribution ! 👌

@maxlipsky

This comment has been minimized.

Copy link

commented Jan 18, 2019

Thanks!

@abelorian

This comment has been minimized.

Copy link

commented Jan 18, 2019

also works ->

brew upgrade node
Upgrading 1 outdated package:
node 10.9.0 -> 11.6.0

@DuncanYe

This comment has been minimized.

Copy link

commented Jan 20, 2019

Work for me too. Thanks!

@nitinnain

This comment has been minimized.

Copy link

commented Jan 22, 2019

I had this same error with Postgresql. brew install postgresql fixed it.
Be cautious if you have important data in Postgres though... Most major DB versions can't read data files from last version.
(I had other issues after this too... but they were psql related and easier to debug)

@CarringtonCreative

This comment has been minimized.

Copy link

commented Jan 23, 2019

@abelorian thanks. That did the trick!

@zolomatok

This comment has been minimized.

Copy link

commented Jan 28, 2019

This worked, thank you! (though, I tried it without "icu4c" at the end)

@klobinoid

This comment has been minimized.

Copy link

commented Jan 29, 2019

Fixed my problem, thx !

@fboutin-pmc

This comment has been minimized.

Copy link

commented Jan 30, 2019

Does anybody actually know WHY this could happen ? Because only re-installing or re-linking will not solve the root cause, if a root cause exists.

@Ghostfly

This comment has been minimized.

Copy link

commented Jan 31, 2019

I think this could happen by installing php after node, don't know why or how, but it's the only thing that changed on my computer since this appear.

@indicolite

This comment has been minimized.

Copy link

commented Feb 1, 2019

Thanks, worked for me ;=)

@mhjadav

This comment has been minimized.

Copy link

commented Feb 3, 2019

Thanks :)

@bpolaszek

This comment has been minimized.

Copy link

commented Feb 5, 2019

Doesn't work for me, neither for node, yarn or php

$ brew uninstall node icu4c node@8 php@7.2 yarn --ignore-dependencies --force
$ brew install node
==> Installing dependencies for node: icu4c
==> Installing node dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-62.1.mojave.bottle.tar.gz
Already downloaded: /Users/bpolaszek/Library/Caches/Homebrew/downloads/2ac513734226effaf79e199fb1612ebce7842df443578bcd61afd73767858aef--icu4c-62.1.mojave.bottle.tar.gz
==> Pouring icu4c-62.1.mojave.bottle.tar.gz
==> Caveats
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

For pkg-config to find icu4c you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

==> Summary
  /usr/local/Cellar/icu4c/62.1: 250 files, 67.3MB
==> Installing node
==> Downloading https://homebrew.bintray.com/bottles/node-11.9.0.mojave.bottle.tar.gz
Already downloaded: /Users/bpolaszek/Library/Caches/Homebrew/downloads/2e30c8593bd3e956d06849da8ac7cee30325be1e04a02e4f4c7d4946fa67a696--node-11.9.0.mojave.bottle.tar.gz
==> Pouring node-11.9.0.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
  /usr/local/Cellar/node/11.9.0: 4,064 files, 48.6MB
==> Caveats
==> icu4c
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

For pkg-config to find icu4c you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

==> node
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d



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

* BANG *

@bzemms

This comment has been minimized.

Copy link

commented Feb 12, 2019

Thanks !!

@psq

This comment has been minimized.

Copy link

commented Feb 13, 2019

looks like everyone has been having a slightly different issue.

What worked for me, which is a variation (simpler?) from what @bpolaszek posted:

brew uninstall node icu4c node --ignore-dependencies --force
brew install node
@juliantellez

This comment has been minimized.

Copy link

commented Feb 14, 2019

brew reinstall node should fix the issue

@MohamedHajr

This comment has been minimized.

Copy link

commented Feb 15, 2019

For those who got this issue after brew upgrade node its just a linking issue for the new binary use
brew link --overwrite node did the trick for me

@seewhoiam

This comment has been minimized.

Copy link

commented Feb 18, 2019

brew reinstall php@7.1 worked for me ,thanks

@shahbazahmed1269

This comment has been minimized.

Copy link

commented Feb 19, 2019

Awesome, thanks!

@paulovalente

This comment has been minimized.

Copy link

commented Feb 21, 2019

brew reinstall php@7.2 worked for me as well!!! ty !

@manbradcalf

This comment has been minimized.

Copy link

commented Feb 27, 2019

As someone running into this issue trying to build an ionic ios app, this worked for me, thank you!

Here is my particular error:

PhaseScriptExecution Copy\ www\ directory /Users/manbradcalf/Library/Developer/Xcode/DerivedData/UZURV360-cwelbgxprvohdbfwtoayfmbmpggb/Build/Intermediates.noindex/UZURV360.build/Debug-iphonesimulator/UZURV360.build/Script-304B58A110DAC018002A0835.sh (in target: UZURV360)
    cd /Users/manbradcalf/Repos/UZURV360/platforms/ios
    /bin/sh -c /Users/manbradcalf/Library/Developer/Xcode/DerivedData/UZURV360-cwelbgxprvohdbfwtoayfmbmpggb/Build/Intermediates.noindex/UZURV360.build/Debug-iphonesimulator/UZURV360.build/Script-304B58A110DAC018002A0835.sh

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

I did have the icu4c library but the xcode build script was looking for the wrong version.

@forresthopkinsa

This comment has been minimized.

Copy link

commented Mar 4, 2019

A much simpler solution will probably work for 2019 users

As mentioned in this SO answer, you very likely only need to switch your icu4c from version 63 to version 62:

brew switch icu4c 62.1

A bit less extreme method.

@kowalski-piotr

This comment has been minimized.

Copy link

commented Mar 7, 2019

works great! thanks!

@iacutone

This comment has been minimized.

Copy link

commented Apr 1, 2019

Thanks @trainoasis, brew link --overwrite node worked for me.

@andela-cdike

This comment has been minimized.

Copy link

commented Apr 4, 2019

Thanks. That worked for me.

@ashwinneo

This comment has been minimized.

Copy link

commented Apr 8, 2019

Worked for me too. thanks :)

@telmott

This comment has been minimized.

Copy link

commented Apr 11, 2019

👍

@nachbarshund

This comment has been minimized.

Copy link

commented May 16, 2019

Thanks @trainoasis, brew link --overwrite node worked for me as well 🚀

@rriixx

This comment has been minimized.

Copy link

commented May 23, 2019

brew reinstall php@7.2 worked for me as well. Thx!

@mincong-h

This comment has been minimized.

Copy link

commented Jun 26, 2019

👍, thanks

@alexbrohman

This comment has been minimized.

Copy link

commented Jun 27, 2019

@forresthopkinsa Thanks this worked for me!

@bernardoseven

This comment has been minimized.

Copy link

commented Jul 1, 2019

Heya. This doesn't solve my issue by itself unfortunately :) While reinstalling node this pops up:

==> Pouring node-10.1.0.high_sierra.bottle.tar.gz Error: The "brew link" step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/node
Target /usr/local/bin/node
is a symlink belonging to node. You can unlink it:
brew unlink node

To force the link and overwrite all conflicting files:
brew link --overwrite node

Gotta run brew link --overwrite node to make it work.

THANKS a LOT!!! Works perfectly!!

@forresthopkinsa

This comment has been minimized.

Copy link

commented Jul 3, 2019

@alexbrohman glad I could help!

@tiagomatosweb

This comment has been minimized.

Copy link

commented Jul 11, 2019

Worked for me too. Tks

@iamcrazycoder

This comment has been minimized.

Copy link

commented Jul 20, 2019

Thank you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.