루비 온 레일즈에서 html 파싱에 사용하는 Nokogiri를 설치할 때 아래처럼 libxslt 관련 오류가 발생하면 libxslt를 설치해주면 됩니다.

Installing nokogiri (1.5.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.8 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.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.


설치 방법은 다음과 같습니다.
sudo apt-get install libxslt-dev libxml2-dev

아아... 고난과 역경의 연속이군요. OTL....

+ Recent posts