-
-
Notifications
You must be signed in to change notification settings - Fork 905
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
Install on Mac OSx with MacPorts fails to find libxml2 #972
Comments
As you see from the output, the gem has freshly built libxml-2.8.0 and tries to use it for building nokogiri.so instead of the one installed by MacPorts. (libxml2 2.9.x is not yet supported by the way) You have to check out config.log for the reason why it is failing. It might be due to some unfortunate contradiction, like the 2.9.1 library somehow being linked while using the 2.8.0 headers, but that's just a wild guess after all. |
I'm having a similar problem with homebrew. |
I've merged the static_clean branch, so the game has changed. Please recheck with the current master. |
I had some problems installing nokogiri. Resulted I was on a "noexec" partiction. |
In my case, the solution was to remove some of the symlinks that existed either at |
As I said, you guys have to show us some configure.log, mkmf.log or whatever log the build is failing at for further investigation. Me too's do not help much. In this case, the build is failing in trying to find xmlParseDoc() in libxml2, so you should look through mkmf.log for the actual error the compiler or linker emits and the flags given. |
I suspect this should be closed. |
I believe the current installation tutorial has correct and up-to-date instructions for OSX: Please let me know if you feel it's missing information or is inaccurate. Thank you! |
Frustrated that it is Feb 2015 I'm having all the same problems with xml2/xslt that these issues from 2013 brought up. I've used -dir/-lib/-config, and watched gems buld xml2 then fail to locate it a few lines later, and I've had to update zlib/iconv to +universal due to linker errors trying to pull in i386 symbols even though my arch is x86_64. port/brew/ruby all updated. Neither of my config.log files for xml2/xslt have errors. How does the make process patch libxml2, say it's OK, then fail to find it a few steps later? Tool versions
Ports installed versions...
Build log:
Six hours of banging on this. Either I'm missing something totally obvious or I've got a lot of re-installing to do. Any help greatly appreciated. |
@petertorelli I suspect you're going to continue to be frustrated considering you're piggybacking on a closed issue. |
Why using port to install libxml and not brew ? https://sigilium.com/signatures/rcDC_ix8fTp6sz8EERs4GCcz41fX0rc/link
|
Please make sure you've followed instructions from the nokogiri.org Hint: you shouldn't have to install libxml/libxslt.
|
@flavorjones Thanks Mike. I originally started off with the official instructions on the nokogiri.org website, top to bottom, tried everything. Then ventured off into google search reading about the same issue on places like stackoverflow pages. I'll tabula rasa my system and start from the top again and see what happens. (I realize the two libs can be built as part of the make process, or supplied from the OS. I tried both paths as shown on the .org page.) |
Just in case other people run into this, the command for installing Nokogiri against Macports is:
|
Had exact same error as @petertorelli. Looks I did not have libxslt/libxml2 installed through macports ('port installed | grep lib' did not return them), but had symlinks in /usr/lib. Installing through brew did not work. Installed both through 'port install libxslt'. Then @matadon command did install nokogiri gem install nokogiri -- --use-system-libraries --with-xml2-config=/opt/local/bin/xml2-config --with-xslt-config=/opt/local/bin/xslt-config Thanks much |
Hello , why are you still using macports ? Is their a specific reason ? |
FYI... I switched to homebrew quite some time ago; much better than ports, IMO. |
@flavorjones please lock this one down. Others: not helping. |
Short output from gem install nokogiri is:
However, MacPorts says that's already installed:
port installed | grep lib libxml @1.8.17_0 (active) libxml2 @2.9.1_0 (active)
What in the heck is going on here? It seems really weird to me that the
installer is compiling libxml2 and then can't find it!
I've followed the installation instructions at Nokigiri Installation and
that doesn't help. I also tried installing 1.5.9 and that failed the same way.
I've upgraded all ports, upgraded MacPorts...
The text was updated successfully, but these errors were encountered: