zbcy5q
Last Updated: February 25, 2016
·
1.571K
· novalagung

Ruby - Error installing nokogiri 1.5.10 in ubuntu 'libx*** is missing'

Error message :

novalagung@dreambender:~/Documents/situs-sunnah$ gem install nokogiri -v '1.5.10'
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

    /home/novalagung/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... no
-----
libxslt is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Solution :

sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

gem install nokogiri -v '1.5.10'