-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting error while using Node v4.2.4 #43
Comments
Hi, which version of the addon are you using? |
Which version of node-libcurl am I using? 0.7.0 |
When you updated node.js, did you rebuilt the module? (aka, If yes, try running I don't have a Mac to test it, but looks like an issue with homebrew from what I can see searching for this error, can you try to update libcurl/homebrew? |
I didn't have homebrew on the computer I'm working in so I installed it, and now I have libcurl v7.46.0. Running
I also tried running tried running
Thank you so much for helping me! |
Looks like an issue with npm, try cleaning the cache and reinstalling the node modules: $ npm clean cache
$ rm -rf node_modules |
yay! That did the trick. Thank you so much! Btw, for reference the first command needs to be switched around to be |
Glad you got it fixed! |
@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.
|
This is an issue with the libcurl version installed, it wants compatibility with library version 4 (Which probably means Mac 10.4), but this module only supports 9 (Mavericks, 10.9) or later. So it doesn't want to open libcurl. I really don't know how to fix this since I don't own a Mac, but from what I could gather doing some research you can try to install homebrew which has a libcurl version compiled with the latest xcode. |
Interesting cause I'm running 10.10.5 thanks |
Yeah I'm already running Homebrew and installed latest curl + libcurl so just an odd error. Bummer, was hoping this library would work for me. Thanks anyways |
The Mac version you have installed is not the cause, but the minimum version required by the libcurl module (not this addon). This is set while compiling it. |
ahh I see, the libcurl itself is saying hey I need compatibility with 4 but this module is 9+ |
yup, the easy way to fix that is you getting libcurl and compiling it from source, if you have the time to do that, it would be like the following:
|
@JCMais i'll try that, i'd rather avoid losing some of the node work i've done so far for this project |
@JCMais running into a snag, it doesn't appear there is a configure file or directory when getting to that step, i've googled but not much help so far. Any pointers on what that means/why it's saying no such file or dir? |
I've missed the call to Ping me on gitter if you have other issues. |
Will do thanks for going above and beyond on this! |
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
and then it was working. If I just installed it with
I 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. |
It means that one pre built binary for your system was found, however you are probably getting one error when trying to use the library because it was compiled with one more recent toolchain, that your system currently doesn't have, that is why it works when you use |
@kohanyirobert thank you, your solution simply worked for me. |
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. |
@simiansim
and it works just fine, i am sure this travis issue is something but the message displayed is wrong maybe. |
Sorry for commenting on this closed issue, but what helped me to solve this problem is: The suggested solution that @JCMais gave on 4 Feb 2016, does not create or replace the libcurl.4.dylib file what the source of the problem is and where the compiler is complaining about. I hope this solution will work for someone else too... |
What you are doing by running brew is to separately install curl and ensure that libcurl.4.dylib is "somewhere" on your system path & it only works if the place that brew installs it is also on your system path. While I am not sure, I suspect (hope) that @JCMais is updating the build automation (travis) that creates the bindings so that you don't have to fix it externally. |
I'm keeping an eye on this issue, but currently I'm not having time to work on it, if anyone has the opportunity and know-how to fix it, it would be awesome. |
reopening this since it's still an issue. For a matter of fact, there is travis on the path of the linked library because the process of generating macOS prebuilt binaries is by building the library in a macOS environment on Travis CI, the build config is here if anyone can take a look: https://github.com/JCMais/node-libcurl/blob/84006ec/.travis.yml This issue is really hard for me to track down, since I don't have access to a mac right now. |
Full path should be replaced with @rpath and rpaths added for mac, so basically after node_libcurl.node is built we need to execute:
|
@rpaths should be added; link only against libcurl
I submitted changes to binding.gyp that will fix this issue. They make output of "otool -L" look way better and "otool -l" has standard paths to libs on mac. |
I tried @koskokos2's branch "linking-improvement-mac", and found it works mostly... certainly looking in the right direction. Specifically the use of install_name_tool to change the linking paths is important. Playing with the specific set of paths passed to my results. doing an
So at this point my test code started to work... but again I am worried it is finding the path incorrectly. I am including info about my system. /usr/local/lib seems to be my working lib location. The resulting binding file contained a reference using otool run against the binding file shows an issue
on my system the build seems to point towards ...I am not an expert on otool and install_name_tool (and its tricks like rpath) either. I found this background info: |
Ran into the same issue today:
Switched to @koskokos2's branch (thanks!) and everything is super now 🎉: yarn add koskokos2/node-libcurl#linking-improvement-mac console.log(require('node-libcurl').Curl.getVersion())
// => libcurl/7.43.0 SecureTransport zlib/1.2.5 |
I 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. |
LGTM too. |
just published an alpha release for that, if anyone wanna test: |
@JCMais worked for me! |
Glad to hear, all props to @koskokos2 for the awesome work! I will cut a major release some time next week. |
Hello~
Could you help me diagnose my error? Everything was working fine when I was using Node v 0.12.7.
OS: OSX 10.10.5
xcode: 7.2
libcurl: 7.43.0
Thanks!
The text was updated successfully, but these errors were encountered: