2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fluentdのpluginを入れる際の注意点

Posted at

プラグインを入れる際下記のようなエラーになっていろいろ調べたけど最初わからなかった。
ruby/thread.hの行でエラーになってるっぽいのでちゃんとincludeされてないのかとか思ったけど実際は違って、
結局gccが足りなかったということだった。
別環境ではインストールできていたのでなぜなのか気づくのに時間かかった・・・。

Building native extensions.  This could take a while...
ERROR:  Error installing fluent-plugin-mysql_explain:
        ERROR: Failed to build gem native extension.

    /opt/td-agent/embedded/bin/ruby -r ./siteconf20160901-9025-102pzis.rb extconf.rb
checking for ruby/thread.h... *** 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
        --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=/opt/td-agent/embedded/bin/ruby
/opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:598:in `try_cpp'
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:1072:in `block in have_header'
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:923:in `block in checking_for'
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:922:in `checking_for'
        from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:1071:in `have_header'
        from extconf.rb:16:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/mysql2-0.4.4 for inspection.
Results logged to /opt/td-agent/embedded/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0/mysql2-0.4.4/gem_make.out
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?