rubyrubygemsnokogirigitlablibxslt

libxslt is missing while installing ruby gem nokogiri


I recognize that this is a duplicate question however all the other answers I've found related to this issue have not seemed to help me...

I'm installing GitLab and running through the gem dependencies when it hits the NokoGiri gem requirement and fails with the following info:

ERROR:  Error installing nokogiri:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
extconf.rb:10:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:10:in `<main>': Use RbConfig instead of obsolete and deprecated Config. 
extconf.rb:11:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... yes
checking for xmlParseDoc()... -lxml2
checking for xsltParseStylesheetDoc()... -lxslt
-----
libxslt is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----

So, this error leads me down the path of attempting to install libxslt with the following command:

$ sudo apt-get install libxslt-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
libxslt1-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 146 not upgraded.

So what gives? NokoGiri is needing this package, but the package is already installed!! I can't seem to get past this issue, any help out there?


Solution

  • Try Nokogiri 1.6.0.rc1, which bundles libxml2 and libxslt in the gem. This should address your installation problem:

    gem install nokogiri --pre
    

    should do the trick.