Error installing Nokogiri 1.6.3.1 on Mac OS X 10.15

127 views
Skip to first unread message

Jack Royal-Gordon

unread,
Oct 7, 2020, 4:33:01 PM10/7/20
to nokogi...@googlegroups.com
I got the "libiconv is missing” error when trying to install a newer version of Nokogiri. Went to http://nokogiri.org/tutorials/installing_nokogiri.html as suggested in the error message, found the issue about "Unable to find libraries on macOS Mojave”, and saw the temporary workaround. Unfortunately, that is not available for OS X 10.15. Is there some other way to work around the issue, such as adding a command line switch to “gem install nokogiri” to point it at the correct folder?

Jack

Wayne Brissette

unread,
Oct 7, 2020, 5:09:03 PM10/7/20
to nokogi...@googlegroups.com


Jack Royal-Gordon wrote on 2020-10-07 15:32:
I got the "libiconv is missing” error when trying to install a newer version of Nokogiri. Went to http://nokogiri.org/tutorials/installing_nokogiri.html as suggested in the error message, found the issue about "Unable to find libraries on macOS Mojave”, and saw the temporary workaround. Unfortunately, that is not available for OS X 10.15. Is there some other way to work around the issue, such as adding a command line switch to “gem install nokogiri” to point it at the correct folder?

Jack

I'm using Mac OS X 10.15.7, I currently have the following:
nokogiri (1.11.0.rc3, 1.10.10, 1.10.9)

Why are you trying to install 1.6?

-Wayne

Wayne Brissette

unread,
Oct 7, 2020, 5:16:46 PM10/7/20
to nokogi...@googlegroups.com


Jack Royal-Gordon wrote on 2020-10-07 15:32:
I got the "libiconv is missing” error when trying to install a newer version of Nokogiri. Went to http://nokogiri.org/tutorials/installing_nokogiri.html as suggested in the error message, found the issue about "Unable to find libraries on macOS Mojave”, and saw the temporary workaround. Unfortunately, that is not available for OS X 10.15. Is there some other way to work around the issue, such as adding a command line switch to “gem install nokogiri” to point it at the correct folder?

Jack
--

I guess the first question, although the build didn't say this, is do you have the build tools available (aka Apple's Command Line Tools)?

If not, use:
xcode-select --install

I decided to try it again and it worked without issue, but it's also trying to install 1.10.10. I seem to recall a while back (and it has been a few years) that there was something like this that happened to me that just went away with a later version. Which again makes me wonder why you're trying to use 1.6.

>From my recent build:
% gem install nokogiri
Fetching nokogiri-1.10.10.gem
Building native extensions. This could take a while...
Successfully installed nokogiri-1.10.10
Parsing documentation for nokogiri-1.10.10
Installing ri documentation for nokogiri-1.10.10
Done installing documentation for nokogiri after 2 seconds
1 gem installed

Jack Royal-Gordon

unread,
Oct 7, 2020, 5:17:43 PM10/7/20
to nokogi...@googlegroups.com
Hi Wayne,

I guess the best answer I can give is because I’ve been using that version in this project for a number of years. I’m not exactly sure why it was rebuilding the gem native extensions (I assume that it won’t if they’re already built), but it is. I’m open to using a newer version if you can recommend one. However, I have not yet upgraded past Ruby 2.0 so I need a version with compatibility with it (I am currently migrating through the minor Rails versions up to newer ones, and my plan (once I get on 4.2) is to upgrade to a much newer Ruby version.

Jack

--
You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nokogiri-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nokogiri-talk/60132c5d-e093-73d7-ac19-18608d075c48%40att.net.

Wayne Brissette

unread,
Oct 7, 2020, 5:22:53 PM10/7/20
to nokogi...@googlegroups.com


Jack Royal-Gordon wrote on 2020-10-07 16:17:
I’m open to using a newer version if you can recommend one. However, I have not yet upgraded past Ruby 2.0 so I need a version with compatibility with it (I am currently migrating through the minor Rails versions up to newer ones, and my plan (once I get on 4.2) is to upgrade to a much newer Ruby version.
And this is where my knowledge kind of falls apart. I'm not sure what versions of Nokogiri are compatible with what versions of Ruby (for the record I'm on 2.7.1p83), and I'm even less knowledgeable about what it would take to get this on what version of Rails since I'm not using that framework in any of my projects. Hopefully somebody else can give you the answers you need. Sorry.

Mike Dalessio

unread,
Oct 8, 2020, 12:28:29 PM10/8/20
to nokogiri-talk
Hi Jack,

I'm afraid the Nokogiri maintainers simply don't have the bandwidth to continue to test and ensure installation and upgrade paths for every version of Nokogiri as new versions of operating systems and ruby are released. Our policy is to provide support only for the current minor release, which right now is v1.10.x (released January 2019).

(The upgrade to Catalina is a doozy, Apple has changed a lot about the build chain since 2016 and unfortunately Nokogiri 1.6 may simply not be installable without some of the many changes we've made since then to Nokogiri's installation scripts to support Apple users.)

Please consider upgrading to a secure and supported version of Ruby and Nokogiri and I promise we'll be able to help! Thanks for understanding.

-mike


--
You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nokogiri-tal...@googlegroups.com.

Jack Royal-Gordon

unread,
Oct 8, 2020, 3:59:55 PM10/8/20
to nokogi...@googlegroups.com
Hi Mike,

No worries, I totally understand. I was not expecting official support from the developers, but I was hoping that someone might have encountered this issue before, or that someone who has fought the battle of version dependence might have some suggestions of how to troubleshoot the issue.  I figured out the problem, and it was an issue primarily because of the age of the installation script and the changes in tools that have occurred in the meantime. As it turns out, the gem installation requires the addition of  -- --with-cflags="-Wno-error=implicit-function-  to the command line. This is required because after the creation of those scripts, the default setting for clang changed from allowing implicit function declaration to requiring explicit function declaration.

So consider this an item to be added to your knowledgebase. Hopefully, this will be useful to someone else at some point.

Thanks for the incredible product that is Nokogiri, Mike and Devs. I wouldn’t have my product without it.

Jack

Mike Dalessio

unread,
Oct 8, 2020, 4:11:59 PM10/8/20
to nokogiri-talk
Hey Jack,

I'm happy to hear you were able to make this work!


Reply all
Reply to author
Forward
0 new messages