node-rsa icon indicating copy to clipboard operation
node-rsa copied to clipboard

Mac OSx: [Error: Unable to load shared library rsaBinding.node]

Open nourspace opened this issue 14 years ago • 7 comments

Hi thanks for this package it works perfectly on linux, however when i tried it on my macbook with snow leopard i keep getting this error when requiring the rsa in any node script.

SYRONs-MacBook-Pro:chrisa-node-rsa-ecefeb9 SYRON$ node test/test.js [Error: Unable to load shared library /Users/SYRON/Downloads/chrisa-node-rsa-ecefeb9/build/Release/rsaBinding.node]

screenshot: http://cl.ly/280m1M2m3p0g3p2K0Q3I

Thanks

nourspace avatar Dec 12 '11 12:12 nourspace

Hi,

Which version of node, and which version of OS X are you using?

Using the 06x-compat branch definitely works on 10.7 / Lion.

Thanks Chris.

chrisa avatar Dec 12 '11 13:12 chrisa

mac osx 10.6.8 node v0.6.3

nourspace avatar Dec 12 '11 13:12 nourspace

I built in on lion then copied the folder to my snow leopard and it worked after removing/uncommenting this line from package.json

// "files" : [ "LICENCE", "README.md", "test", "rsa.public", "rsa.private" ],

nourspace avatar Dec 14 '11 08:12 nourspace

+1

Ubuntu 11.04 32 and 64 bit.

The solution to the problem for me is to manually copy rsaBinding.node from build/Release to the root of the module. Then all works fine.

saltatory avatar Dec 14 '11 11:12 saltatory

So the cause of this seems to be that depending on platform, the way node was built, node version and maybe other things, the directory created under build/ varies: "default", "Release", "Debug" etc.

There is code in the wscript to symlink from the root of the module to the actual file built in build/Something/rsaBinding.node, but it doesn't appear to be correct - so manually copying instead gets things working.

I need to figure out what's the correct thing to do in the wscript - there must be a standard incantation for this that I'm missing.

Thanks for all the feedback here!

chrisa avatar Dec 14 '11 11:12 chrisa

I've adjusted the packaging for this module, and it appears to install correctly on both Linux (Ubuntu 11.04) and OSX (10.7).

The new version is 0.0.2, available in the npm repo or tagged v0.0.2 here.

chrisa avatar Jan 05 '12 19:01 chrisa

It looks like I'm running into a similar problem. Here's the output from running the tests: https://gist.github.com/4af16151605d06ca09e1 . I installed via npm and am running OSX 10.7.3

tzusman avatar Sep 07 '12 03:09 tzusman