I have mac 10.6.8 and I installed node 10.15.3 from nodejs.org using pkg installer and after installing I got this problem when I try to use 'node' or 'npm' on the terminal:

dyld: Library not loaded: /usr/lib/libc++.1.dylib

Referenced from: /usr/local/bin/node 

Reason: image not found

Moreover, when I try brew 'doctor', this is what I see:

Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Tigerbrew formulae, and may need to be deleted.

Unexpected header files:


(huge list of heades files from /usr/local/include/node/ and other subfolders)

1 Answers

Paul Pritchard On Best Solutions

I am using MacOS 10.6.8 (an old version of MacOS!). I installed, using nvm version 0.33.0, Node 10.15.3 and 8.16.0 and both of them gave me the error message about the dyld library shown in Ryuzaki's question above.

After some research I concluded that the libc++.1.dylib is not provided by the version of MacOS that I am using (it only came in on later versions of the OS). Therefore I loaded some earlier releases of Node, namely 6.17.1 and 4.9.1. Neither of these versions had the problem, leaving me to believe that the age of the OS is the problem.