Homebrew-core: node 7.7.4 builds but throws Abort trap: 6, trying to load dyld libicui18n.58.dylib

Created on 28 Mar 2017  路  6Comments  路  Source: Homebrew/homebrew-core

updated brew, upgraded node (formula ran w/o error), ran node -v

Abort trap: 6, dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib

Here are the details:

$ brew update
$ brew upgrade node
==> Upgrading 1 outdated package, with result:
node 7.7.4
==> Upgrading node
==> Downloading https://homebrew.bintray.com/bottles/node-7.7.4.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring node-7.7.4.sierra.bottle.tar.gz
==> Using the sandbox
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
  /usr/local/Cellar/node/7.7.4: 3,148 files, 40.2MB

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

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /Users/stephen/.rbenv/shims/passenger-config

$ brew config
HOMEBREW_VERSION: 1.1.11
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 394f9fa0aaa5854aa52bc589708a079665dcf462
Last commit: 3 weeks ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: bfe7eefdf2c591c56742b6d07aa09fe2bf53746f
Core tap last commit: 78 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
GCC-4.2: build 5666
Clang: 8.0 build 800
Git: 2.12.0 => /usr/local/bin/git
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/stephen/.rbenv/shims/ruby => /Users/stephen/.rbenv/versions/2.4.0/bin/ruby
Java: 1.8.0, 1.7.0_06
macOS: 10.12.3-x86_64
Xcode: 8.2.1
CLT: N/A
X11: 2.7.9 => /opt/X11

Most helpful comment

This fixed the error:

brew upgrade node

All 6 comments

fyi: this works:

$ brew reinstall node --without-icu4c
...
$ node -v
v7.7.4

icu4c appears up-to-date:

$ brew info icu4c
icu4c: stable 58.2 (bottled), HEAD [keg-only]
C/C++ and Java libraries for Unicode and globalization
http://site.icu-project.org/
/usr/local/Cellar/icu4c/HEAD (257 files, 59.8MB)
  Built from source on 2013-11-22 at 11:07:23
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/icu4c.rb
==> Options
--c++11
    Build using C++11 mode
--HEAD
    Install HEAD version
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

macOS provides libicucore.dylib (but nothing else).

Looks like the problem is that you have icu4c built from HEAD:

/usr/local/Cellar/icu4c/HEAD (257 files, 59.8MB)
  Built from source on 2013-11-22 at 11:07:23

An icu4c from 2013 is not what is required here.

brew uninstall node icu4c
brew install node

This fixed the error:

brew upgrade node

None of these fixed the problem for me.
After re-installing, I did the following:

> which node
/usr/local/bin/node
> rm /usr/local/bin/node
> brew unlink node
> brew link --overwrite node

brew upgrade
Worked for me

Brew upgrade do latest node (10.0.0) helps.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gregvirgin picture gregvirgin  路  3Comments

jyutzler picture jyutzler  路  4Comments

Steffen911 picture Steffen911  路  3Comments

jakepetroules picture jakepetroules  路  3Comments

BluePawDev picture BluePawDev  路  3Comments