I'm working on a Meteor app locally on OSX 10.9.5.
I'm getting this error:
dyld: lazy symbol binding failed: Symbol not found: _node_module_register
I believe it has something to do with the zmq package. More on from the error:
Referenced from: /Users/user/node_modules/zmq/build/Release/zmq.node
I've tried:
npm rebuild
uninstalling zmq & re-installing
uninstalling, re-installing, then npm rebuild
deleting node_modules directory, then re-installing zmq to rule out any possible package conflicts. (referenced here: dyld: lazy symbol binding failed: Symbol not found: _node_module_register )
Possible problems I'd rather not test unless absolutely necessary (as it requires full upgrade. I'm on an older computer.):
Warning: Error: dyld: lazy symbol binding failed: Symbol not found: _objc_autoreleasePoolPush
Git > dyld: lazy symbol binding failed: Symbol not found: _iconv_open
A zmq compiled under a newer version of OSX? (I'm using 10.9.5. Upgrading isn't a viable option unless absolutely necessary.)
If this is the problem....
Handling "dyld: lazy symbol binding failed: Symbol not found" error when nm does not find symbol
...How would I statically link the library to zmq???
The full error:
=> App running at: http://localhost:3000/
W20151202-10:02:42.764(2)? (STDERR) dyld: lazy symbol binding failed: Symbol not found: _node_module_register
W20151202-10:02:42.766(2)? (STDERR) Referenced from: /Users/user/node_modules/zmq/build/Release/zmq.node
W20151202-10:02:42.766(2)? (STDERR) Expected in: dynamic lookup
W20151202-10:02:42.766(2)? (STDERR)
W20151202-10:02:42.767(2)? (STDERR) dyld: Symbol not found: _node_module_register
W20151202-10:02:42.767(2)? (STDERR) Referenced from: /Users/user/node_modules/zmq/build/Release/zmq.node
W20151202-10:02:42.767(2)? (STDERR) Expected in: dynamic lookup
W20151202-10:02:42.767(2)? (STDERR)
=> Exited from signal: SIGTRAP
I've been trying to solve this for over a day now. Any help would be appreciated.
我能够通过删除node_modules文件夹来解决此问题,然后运行
$ meteor npm install
(recap of the comments, for others that are interested; since I don't have any hands-on Meteor experience, my solution may be wrong, in which case, feel free to correct me :)
Meteor comes with its own set of node
and npm
executables. If you want to use Node modules that depend on addons , like zmq
, you need to make sure that these modules are installed with the Meteor-supplied executables; otherwise, you may run into issues (although it may work if you install the same version of Node that Meteor uses, which seem to be node@0.10.40
and npm@1.4.28
, although I don't know if the Meteor executables are "plain" Node/npm or if they are patched).
The executables can be found within the .meteor
directory. In case of OS X, they are located in ~/.meteor/packages/meteor-tool/1.1.10/mt-os.osx.x86_64/dev_bundle/bin/
(although the version number may vary, I suppose).
An easy way for making sure that the Meteor executables are used instead of a globally installed Node/npm, you can add that directory to the start of your $PATH
:
$ export PATH=~/.meteor/packages/meteor-tool/1.1.10/mt-os.osx.x86_64/dev_bundle/bin/:$PATH
After that, in the same shell session, both node
and npm
should now point to the Meteor-supplied versions and you can install addons using them:
$ npm install zmq
My understanding of this error is that there is a mismatch between node versions used to install/run node.js code.
I had this issue because I npm installed with node 5, but my run config was node 0.11.something.
I switched my run config to use node 5, and the problem went away.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.