`
jn615
  • 浏览: 97838 次
  • 性别: Icon_minigender_1
  • 来自: 火星
社区版块
存档分类
最新评论

install nokogiri error

阅读更多
sudo gem install nokogiri
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
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=.
--curdir
--ruby=/usr/bin/ruby1.8
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/nokogiri-1.4.4 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/nokogiri-1.4.4/ext/nokogiri/gem_make.out
star@star-ubuntu:~$ sudo gem install ruby-xslt
Fetching: ruby-xslt-0.9.8.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-xslt:
ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.8 extconf.rb
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetFile() in -lxslt... no
checking for exsltRegisterAll() in -lexslt... no
extconf.rb:4: command not found: xslt-config --cflags
creating extconf.h
creating Makefile
/usr/lib/ruby/1.8/mkmf.rb:1345: warning: global variable `$preload' not initialized

make
gcc -I. -I. -I/usr/lib/ruby/1.8/i686-linux -I. -DRUBY_EXTCONF_H=\"extconf.h\"  -D_FILE_OFFSET_BITS=64  -fPIC -g -Wall -I/usr/include/libxml2  -fno-strict-aliasing -g -g -O2  -fPIC  -DUSE_ERROR_HANDLER -DRUBY_1_8 -DUSE_EXSLT  -c xslt_lib.c
In file included from xslt_lib.c:19:0:
xslt.h:40:27: fatal error: libxslt/extra.h: No such file or directory
compilation terminated.
make: *** [xslt_lib.o] Error 1


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ruby-xslt-0.9.8 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ruby-xslt-0.9.8/ext/xslt_lib/gem_make.out








解决:

sudo apt-get install libxslt-dev libxml2-dev
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics