Yosemiteにfluent-plugin-elasticsearchをインストールする

2014/11/09

fluentd OSX 管理者

t f B! P L
記事内に広告が含まれています。
Elasticsearch + KibanaでOSX(Yosemite)のリソース監視してみようと思った。

最近のfluentdはPackageからインストールするものらしい。というわけで、 Installing Fluentd using .dmg Installer (MacOS X) | Fluentdからダウンロードしてインストール。
elasticsearchのプラグインをインストールしようとしたところ、こんなエラーが出た。
% sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-elasticsearch
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing fluent-plugin-elasticsearch:
 ERROR: Failed to build gem native extension.

        /opt/td-agent/embedded/bin/ruby extconf.rb
checking for curl-config... yes
checking for rb_thread_blocking_region()... *** 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
 --with-curl-dir
 --without-curl-dir
 --with-curl-include
 --without-curl-include=${curl-dir}/include
 --with-curl-lib
 --without-curl-lib=${curl-dir}/lib
/opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:456: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:541:in `try_link0'
 from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
 from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
 from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:1027:in `block in have_func'
 from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:918: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:917:in `checking_for'
 from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:1026:in `have_func'
 from extconf.rb:47:in `
' Gem files will remain installed in /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/patron-0.4.18 for inspection. Results logged to /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/patron-0.4.18/ext/patron/gem_make.out %
そう特別なことをやっているわけではないから、前例があるはず。というわけで、ググって MacにKibanaとtd-agentをインストールする - Qiita を発見。command-line toolsをpackageから入れて、一応、sudo -sでrootになって、gcc --versionで確認。
もう一度プラグインのインストールをやり直したら、今度は成功した。command-line toolsはインストールしたと思っていたんだけどなぁ。

人気の投稿

ブログ アーカイブ

自己紹介

ストックオプションを半分しか行使していなかったけど、パワハラをなぁなぁで済まそうとする会社から転職。アーリーリタイアを目指し、自分で稼ぐ術を模索中。

改正電気通信事業法に関する表記

・掲載内容

当サイトでは成果報酬型広告/クリック型広告の効果測定のため、利用者の方のアクセス情報を外部事業者に送信しております。
当該の情報は個人を特定する情報ではございません。また当該の情報が目的外利用される事は一切御座いません。

1.送信される情報の内容
  • 広告の表示日時
  • 広告のクリック日時
  • 広告の計測に必要なクッキー情報
  • 広告表示時及び広告クリック時のIPアドレス
  • 広告表示時及び広告クリック時に使用されたインターネット端末およびインターネットブラウザの種類
2.送信先となる事業者の氏名又は名称
  • グーグル合同会社
  • 楽天グループ株式会社
  • アマゾンジャパン合同会社
  • ヤフー株式会社
  • 株式会社ファンコミュニケーションズ
  • 株式会社もしも
3.利用目的

成果報酬型広告/クリック型広告の効果測定および不正防止のため

QooQ