Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upNokogiri 1.8.4 installation challenges on macOS Mojave #1801
Comments
deepj
changed the title
Nokogiri 1.8.4 is not possible to install
Nokogiri 1.8.4 is not possible to install on macOS Mojave
Sep 26, 2018
This comment has been minimized.
This comment has been minimized.
I was successful with But not with |
This comment has been minimized.
This comment has been minimized.
I'm sorry y'all are having trouble. If someone who is a Mac user would care to verify that this works and submit a PR to the installation tutorial, I would be very grateful. Alternatively, if there's something we can change in the extconf, I'd appreciate a PR. Also tagging @zenspider as he's been kind enough to offer assistance on behalf of Mac users in the past. |
flavorjones
added
the
platform/osx
label
Sep 27, 2018
flavorjones
changed the title
Nokogiri 1.8.4 is not possible to install on macOS Mojave
Nokogiri 1.8.4 installation challenges on macOS Mojave
Sep 27, 2018
This comment has been minimized.
This comment has been minimized.
I don't think the original report makes sense to me (reformatted):
This says "build and link against system libraries, but look for their configs in these completely different builds". I would expect that to break. See this for more details: http://www.nokogiri.org/tutorials/installing_nokogiri.html#using-your-system-libraries |
This comment has been minimized.
This comment has been minimized.
@zenspider I put one of many iterations made by me here. The problem is still same if I just You're right. There is a mistake in the command Only this worked
The expectation is I need only run |
This comment has been minimized.
This comment has been minimized.
OK. I found the reason why it's happening on Mojave See https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes#3035624 It's needed to make another step and install this as a temporary workaround on Mojave:
For explanation see the Xcode release notes |
This comment has been minimized.
This comment has been minimized.
@deepj Thank you for following up on the thread. Would you be so kind as to submit a PR to this file that includes steps other Mojave users can follow? https://github.com/sparklemotion/nokogiri.org-tutorials/blob/master/content/installing_nokogiri.md I unfortunately don't have a Mac and so can't verify the steps that I might write up are correct. I'd really appreciate your help! |
This comment has been minimized.
This comment has been minimized.
@flavorjones I'll do. But what I got from the Xcode release notes, it's needed to change a way for looking headers on macOS 10.14 and later. Can @zenspider help here, please? I don't have no insight how these compilation stuffs work. |
This comment has been minimized.
This comment has been minimized.
dhh
commented
Oct 29, 2018
I just hit this same problem on a machine upgraded to 10.14. |
This comment has been minimized.
This comment has been minimized.
wsizoo
commented
Oct 30, 2018
Updating command line tools for Xcode fixed this for me. |
This comment has been minimized.
This comment has been minimized.
Again, an open request for Mac users to help support the Ruby community: Can someone please submit a PR to the installation tutorial explaining how to update xcode tooling on 10.14? |
This comment has been minimized.
This comment has been minimized.
cjxonix
commented
Nov 5, 2018
This actually worked for on Mojav Mac OS X |
This comment has been minimized.
This comment has been minimized.
Once more, this time with gusto: can a Mac user on this issue please help support the Ruby community by submitting a PR to the installation tutorial explaining how to update xcode tooling on 10.14? |
This comment has been minimized.
This comment has been minimized.
@flavorjones the xcode command line tools is updated via app store. @wsizoo note seems to be confusing here. Just read the xcode release notes https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes#3035624 My understanding is that nokogiri needs to change a way where is looking for the headers on Mojave 10.14 with new xcode command line tools 10.x. As Apple noted in the release notes they offer a temporary workaround to install the headers to the old place. This won’t be possible later. Apple recommends to change the place where looking for the headers to new one. So updating xcode command line tools doesn’t help either. That is my understanding the situation. I may be wrong here: |
This comment has been minimized.
This comment has been minimized.
grega
commented
Nov 7, 2018
•
I managed to install it on 10.14 by running:
Followed by:
Happy to submit a doc update PR if this solution appears to help others. |
This comment has been minimized.
This comment has been minimized.
@grega the problem with this, it won't work in the future. It's just a temporary workaround offered by Apple. Just read this https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes#3035624 |
This comment has been minimized.
This comment has been minimized.
Ok, I better understand the underlying challenge, which is to look for header files and libraries in the right place with the new XCode SDK. Thanks for that. This is still not something I'm personally equipped to handle, so I'd like to ask that someone who cares about Mac support help me either by submitting a PR or working with me to figure out what an appropriate solution looks like. I don't own a Mac, and and in addition this is something I'd expect someone from the community can help with or own entirely. |
This comment has been minimized.
This comment has been minimized.
OK, maybe if I provide a bit more information on how I'd address this if I had access to a Mac running Mojave, somebody can verify that the approach would work.
if darwin?
ENV['CFLAGS'] = "#{ENV['CFLAGS']} -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
end Is anyone here able to try patching their |
This comment has been minimized.
This comment has been minimized.
markoa
commented
Nov 28, 2018
I was able to install Nokogiri on Mojave after running only |
This comment has been minimized.
This comment has been minimized.
bacchir
commented
Nov 28, 2018
•
For people using homebrew the documentation around macOS and homebrew install helped me figure out the command bellow which worked for me:
|
This comment has been minimized.
This comment has been minimized.
Hey all, I my comments above I suggested a potential fix, provided a patch, and asked if any macOS users would try it out and let me know if it resolves the underlying issues. This comment is asking one last time if anyone in Ruby community who's a macOS user can try this three-line change out on their local machine and let me know if it addresses the underlying issue. If somebody can try it out and respond, I'll provide an emphatic "thank you" in the changelog for your help. If nobody responds, I'm going to assume it's no longer an issue. |
flavorjones
added
the
state/will-close
label
Dec 1, 2018
This comment has been minimized.
This comment has been minimized.
grega
commented
Dec 2, 2018
@flavorjones Afraid I haven't had any luck getting my Mac back to a state in which Nokogiri was failing to install, so I have been unable to test the suggested fix in |
This comment has been minimized.
This comment has been minimized.
bbonamin
commented
Dec 3, 2018
Hey @flavorjones, I want to let you know that 1.8.5 installs automatically in Mojave computers with the latest updates and without needing to do any changes to nokogiri (or your suggested change to extconf.rb) |
This comment has been minimized.
This comment has been minimized.
AndreiRailean
commented
Dec 4, 2018
•
@bbonamin you're probably talking about a clean install where there was no nokogiri in the past. I think half the people come here because it breaks after os or brew upgrade. Definitely was the case for me. After bashing my head against it for a few hours it turned out that I had a stale libxml path in bundle config. I ended up using |
This comment has been minimized.
This comment has been minimized.
kenkuts
commented
Dec 17, 2018
I am so happy this solved my problem I've been trying to fix this for the past few days. Y'all need to fix these installation issues. |
This comment has been minimized.
This comment has been minimized.
@kenkuts Did you happen to read any of my comments above where I'm trying to get someone to confirm that a one-line change in Once again: any Mac users arriving at this issue, STOP trying to hack it. Read this comment above: Please clone the repository, make this small change to extconf.rb, run I'm about to cut v1.9.0 and to date nobody who is using a Mac has been able to tell me if that fix works, and so it's not going to be in this release. It won't be in a release until someone can confirm that it works. Snarky comments will not get the job done; testing a suggested fix will. |
This comment has been minimized.
This comment has been minimized.
@flavorjones OK, I figured out why this happens to someone of us. Someone of us has something like I've tried the patch. And that didn't help at all. |
This comment has been minimized.
This comment has been minimized.
duranmla
commented
Dec 17, 2018
In my case, the problem was more related to https://stackoverflow.com/questions/14607193/installing-gem-or-updating-rubygems-fails-with-permissions-error Basically, when I run the Once I make sure that after run |
This comment has been minimized.
This comment has been minimized.
dmzza
commented
Dec 17, 2018
Updating to the latest version of Nokogiri 1.9.0 solved the problem for me
|
This comment has been minimized.
This comment has been minimized.
rajivshah3
commented
Dec 19, 2018
•
Hey @flavorjones , this seems to work for me (I used Edit: Nokogiri 1.9.1 now works for me when I install it from a Gemfile and use |
This comment has been minimized.
This comment has been minimized.
@rajivshah3 thank you. That last one is bundler... And I thought it was fixed. I haven't seen it for a little while. You might want to update. |
This comment has been minimized.
This comment has been minimized.
Onkar09
commented
Dec 21, 2018
This worked for me. Tried almost all the suggestions available on google, stackoverflow, github but failed. This is like life saver for me. |
This comment has been minimized.
This comment has been minimized.
@deepj Thanks for your reply -- there's a lot of noise in this thread and you're providing some clarity. Can you provide your |
This comment has been minimized.
This comment has been minimized.
@flavorjones Hello, I'll look at it this weekend and then I let you know. I'm sorry for the late answer, holidays here. |
This comment has been minimized.
This comment has been minimized.
Please note that @mlj confirmed that the fix suggested in #1801 (comment) works for him, and has submitted the PR in #1851 |
This comment has been minimized.
This comment has been minimized.
I've merged #1851 into master. I'm considering cutting a v1.10.1 release with this change. Will leave this open until a version is shipped. |
flavorjones
removed
the
state/will-close
label
Jan 5, 2019
flavorjones
added this to the v1.10.x patch releases milestone
Jan 5, 2019
This comment has been minimized.
This comment has been minimized.
FranklinYu
commented
Jan 12, 2019
@Onkar09 Could you please provide more context?
|
This comment has been minimized.
This comment has been minimized.
FranklinYu
commented
Jan 12, 2019
•
@flavorjones I think most of the “solutions” mentioned above are already covered in the documentation; others just cannot reproduce, so we can close this issue.
Ok I read that macOS Mojave is not adding |
This comment has been minimized.
This comment has been minimized.
@FranklinYu A fix has already been commited to master - please see my comment above. |
deepj commentedSep 26, 2018
If you're having trouble installing Nokogiri ...
Have you tried following [the installation tutorial][tutorial]?
yes
What is the output of
gem install
?What are the contents of the
mkmf.log
file?What operating system are you using?
macOS 10.14 Mojave
I've tried to reinstall everything what I could but without any success. I used
pkg-config
,libxml2
andlibxslt
from Homebrew...