node-libcurl: Getting error while using Node v4.2.4
Hello~
Could you help me diagnose my error? Everything was working fine when I was using Node v 0.12.7.
return process.dlopen(module, path._makeLong(filename));
^
Error: dlopen(/Users/angie/projects/node-projects/search-api/node_modules/node-libcurl/lib/binding/node_libcurl.node, 1): Library not loaded: /Users/travis/lib/libcurl.4.dylib
Referenced from: /Users/angie/projects/node-projects/search-api/node_modules/node-libcurl/lib/binding/node_libcurl.node
Reason: Incompatible library version: node_libcurl.node requires version 9.0.0 or later, but libcurl.4.dylib provides version 7.0.0
OS: OSX 10.10.5 xcode: 7.2 libcurl: 7.43.0
Thanks!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 36 (17 by maintainers)
Commits related to this issue
- fix #43 mac libs should be linked against @rpath libs and list of @rpaths should be added; link only against libcurl — committed to koskokos2/node-libcurl by deleted user 6 years ago
Sorry for updating a closed issue, but I was having the same problem and I was able to solve it without building manually anything.
I just removed the module
npm uninstall node-libcurlthen reinstalled itnpm install node-libcurl --build-from-sourceafter that I saw the followingand then it was working. If I just installed it with
npm install node-libcurlthe following was loggedI don’t know what installed via remote means, but essentially it doesn’t work that way, only if the library is built locally. Hope this helps others.
@simiansim you are right, i have installed
and it works just fine, i am sure this travis issue is something but the message displayed is wrong maybe.
just published an alpha release for that, if anyone wanna test:
node-libcurl@nextI added one more path that will handle Brew when does not want to mess with system curl and is using special path. Now I think it is ready to be merged.
Just pointing this out that all of these people reported exactly “Library not loaded: /Users/travis/lib/libcurl.4.dylib”, and I don’t think any of those people are named “travis”. This is a baked-in incorrect reference.
The compiled file “node_modules/node-libcurl/lib/binding/node_libcurl.node” contains this reference (BTW: the “Users/travis” directory does not exist on my machine either, in case that was a surprise). The fact that this actually works for most people on a Mac seems very accidental (It fails trying an invalid ref before trying other system paths).
Once rebuilt with the commands described above there is no such reference at all (“travis” or otherwise), in the binding file.
@JCMais I’m experiencing this issue as well… Any thoughts?
I have libcurl 7.43.0 and followed these same commands as you instructed. Even clearing the cache, deleting node_modules and rebuilding them.
yay!
That did the trick.
Thank you so much!
Btw, for reference the first command needs to be switched around to be
$ npm cache clean