1
sudo /usr/lib64/fluent/ruby/bin/fluent-gem update

Updating installed gems

Updating io-console
ERROR:  Error installing io-console:
    io-console requires Ruby version >= 2.0.0.

Updating nokogiri
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

        /usr/lib64/fluent/ruby/bin/ruby extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.0.0.rc2
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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/lib64/fluent/ruby/bin/ruby
    --help
    --clean
    --use-system-libraries
    --enable-static
    --disable-static
    --with-zlib-dir
    --without-zlib-dir
    --with-zlib-include
    --without-zlib-include=${zlib-dir}/include
    --with-zlib-lib
    --without-zlib-lib=${zlib-dir}/lib
    --enable-cross-build
    --disable-cross-build


Gem files will remain installed in /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.7.2/ext/nokogiri/gem_make.out

Updating ohai
    ERROR:  Error installing ohai:
        ohai requires Ruby version >= 2.0.0.

Nothing to update

ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]

fluentdのアップデートを行うと上記のようなエラーがでます。
Rubyのバージョン2.0.0以上が必要とでているのですが、ruby -vで調べると2.0.0p648なので問題ないように思えます。
上記のエラーでは何を要求しているのかがわからないので、教えていただけますか?

2
  • システムのrubyじゃなくてtd-agentの同梱rubyが古い(1.9.3)?
    – user10685
    2016年1月21日 3:36
  • 1
    td-agent -v2 にしたら大丈夫になりました。 -v1だとruby-1.9.0で, -v2だとruby-2.0.0が梱包されているみたいです。 2016年1月22日 4:07

2 件の回答 2

0

sudo curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh
td-agentのバージョンを変更。

http://docs.fluentd.org/articles/install-by-rpm

0

zlib is missing; necessary for building libxml2

You need to install missing zlib headers which are required for -lz flag in order to compile the sources correctly. Install by:

sudo apt-get install libz-dev

If there is a still problem, on Ubuntu also install these ones:

sudo apt-get install gcc ruby-dev libxslt-dev libxml2-dev zlib1g-dev

この質問に回答するには、ログインする必要があります。

求めていた回答ではありませんか? のタグが付いた他の質問を参照する。