zakki-cho

インプットしたらアウトプットする。アウトプットすることを考えてインプットする。

CentOSに入れたtd-agentでfluent-plugin-elasticsearch (0.3.0)を入れようとしてハマった

結論

yumでlibcurl-develをインストールする。

背景

  • /usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-elasticsearch を実行すると、「libcurlが見つからない」というエラーが出る。
  • Github(https://github.com/uken/fluent-plugin-elasticsearch)を見るとlibcurlが必要になったとのこと。
  • yum install libcurl を実行しても、既に最新版があると言われる。

解決策

結論そのまま。 libcurlではなく、libcurl-develを入れないといけなかった。

恥ずかしながら、develがつくのとつかないので何がどう変わるのかいまいち分かっていなかった。 とりあえずdevelも入れとこ、くらいの思考になってました。

調べてみる

ちなみに、yum info をするとlibcurlとlibcurl-devはそれぞれこんなdescriptionになってる。

yum info libcurl

This package provides a way for applications to use FTP, HTTP, Gopher and other servers for getting files.

yum info libcurl-dev

cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet, and Dict servers, using any of the supported protocols. The libcurl-devel package includes files needed for developing applications which can use cURL's capabilities internally.

なるほど、つまりdevelの方にはアプリケーションの開発に使用するライブラリやヘッダファイルが入ってるってことか。 であれば、今回のようにlibcurlをbuildのときに必要とする場合にはlibcurl-develが必要になるのは納得できる。 すっきりした。