我有mac 10.6.8,并使用pkg installer从nodejs.org安装了node 10.15.3,安装后在终端上尝试使用“ node”或“ npm”时出现此问题:
dyld: Library not loaded: /usr/lib/libc++.1.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
此外,当我尝试酿造“医生”时,这是我看到的:
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:
/usr/local/include/node/libplatform/libplatform-export.h
/usr/local/include/node/libplatform/libplatform.h
/usr/local/include/node/libplatform/v8-tracing.h
/usr/local/include/node/node.h
..............................
(来自/ usr / local / include / node /以及其他子文件夹的大量头文件列表)
答案 0 :(得分:0)
我正在使用MacOS 10.6.8(MacOS的旧版本!)。 我使用nvm版本0.33.0,Node 10.15.3和8.16.0进行了安装,它们都给了我有关上面Ryuzaki问题中显示的dyld库的错误消息。
经过研究,我得出的结论是我正在使用的MacOS版本没有提供libc ++。1.dylib(它仅在更高版本的OS中提供)。 因此,我加载了一些早期的Node版本,即6.17.1和4.9.1。这两个版本都没有问题,让我相信操作系统的年代是问题。