Posted almost 5 years ago. Visible to the public.

Nokogiri gem on FreeBSD, libiconv missing error

If you try to install the nokogiri gem on freebsd you may get the following error message:

Copy
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.

In that case it should suffice to use the following command to install the gem:

Copy
% gem install nokogiri -v 'DESIRED_VERSION' -- --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include

If you get further error messages complaining about libxslt or libxml you may need a couple more options:

Copy
% gem install nokogiri -v 'DESIRED_VERSION' -- --use-system-libraries \ --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \ --with-xml2-lib=/usr/local/lib --with-xml2-include=/usr/local/include/libxml2/libxml \ --with-xslt-lib=/usr/local/lib --with-xslt-include=/usr/local/include/libxslt

Owner of this card:

Avatar
jan0sch
Last edit:
over 4 years ago
by jan0sch
Posted by jan0sch to jan0sch's deck
This website uses cookies to improve usability and analyze traffic.
Accept or learn more