Error While Installing Iconv on Windows by Ruby2.0.0

An error occurred while installing nokogiri (1.6.0), and Bundler cannot continue

I delete the Gemfile.lock, then run bundle install. Everything is ok! :)

libiconv is missing' error when installing Nokogiri on Cygwin

Eventually figured this out myself ... had to direct the installation to use the system's pre-installed dependencies rather than compiling them, and tell it where the libxml2 dev headers were located. This was succcessful for me:

gem install nokogiri -v '1.6.3.1' -- --use-system-libraries --with-xml2-include=/usr/include/libxml2

Why does installing Nokogiri on Mac OS fail with libiconv is missing?

I had the same issue. Unfortunately the "Installing Nokogiri" doesn't cover Iconv issues. Here's how I resolved the issue.

First install homebrew, it'll make your life easier. If you already have it installed, be sure to grab the latest formulae by updating like so:

brew update

Note: In OSX 10.9+ you may need to install xCode command tools to allow you to install libiconv.

xcode-select --install

then install a newer version of libiconv

brew install libiconv

then install your gem

gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14

Failed to gem install nokogiri in Fedora16

Finally got it work, here are the steps:

  • Download libiconv

    wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz

  • Extract files tar -xvzf libiconv-1.11.tar.gz

  • Enter the directory cd libiconv-1.11

  • Configure libiconv Library ./configure --prefix=/usr/local/libiconv

  • Compile libiconv make CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" (I have to add CFLAGS to make the compiling work.)

  • Install libiconv sudo make install

  • Install nokogiri
    CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" gem install nokogiri -- --with-iconv-dir=/usr/local/libiconv --with-iconv-lib=/usr/local/libiconv/lib --with-iconv-include=/usr/local/libiconv/include

Voila, it shows the success message!



Related Topics



Leave a reply



Submit