2015年10月現在、史上最強のmikutterであるmikutter 3.2.9を、Linux Mint 17.1環境にインストールする際に軽くハマったので、自分用の備忘録です。
普通に、
$ wget http://mikutter.hachune.net/bin/mikutter.3.2.9.tar.gz
$ tar -xvzf mikutter.3.2.9.tar.gz
$ cd mikutter
$ bundle install --path vendor/bundle
としますと、以下のようなエラーが出ます。
Installing nokogiri 1.6.6.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/dc1394/.rbenv/versions/2.2.0/bin/ruby -r ./siteconf20151011-8312-154k4a2.rb extconf.rb --use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2
checking if the C compiler accepts ... yes
Building nokogiri using system libraries.
libxml2 version 2.6.21 or later is required!
*** 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=/home/dc1394/.rbenv/versions/2.2.0/bin/$(RUBY_BASE_NAME)
--help
--clean
--use-system-libraries
--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-xml2-dir
--without-xml2-dir
--with-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
--with-libxslt-config
--without-libxslt-config
--with-pkg-config
--without-pkg-config
--with-exslt-dir
--without-exslt-dir
--with-exslt-include
--without-exslt-include=${exslt-dir}/include
--with-exslt-lib
--without-exslt-lib=${exslt-dir}/lib
--with-libexslt-config
--without-libexslt-config
extconf failed, exit code 1
Gem files will remain installed in /home/dc1394/mikutter/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.6.2 for inspection.
Results logged to /home/dc1394/mikutter/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0-static/nokogiri-1.6.6.2/gem_make.out
An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.
これを回避するためには、以下のようにまず、
$ sudo apt-get install libxml2-dev libxslt1-dev
した後、改めて、
$ bundle install --path vendor/bundle
してやれば良いようです。そして、$ ruby mikutter.rb
で、mikutterが無事起動すればインストール完了です。お疲れ様でした。
参考にさせていただいた記事
nokogiriをビルドできずにrailsのインストールが失敗する。