安装fluentd时配置fluent-plugin-elasticsearch发生的错误

2 篇文章 0 订阅
2 篇文章 0 订阅
我们在进行fluentd,elasticsearch,kibana环境搭建时,fluentd需要es作为存储的平台,这个时候在配置 vi /etc/td-agent/td-agent.conf时
  1. <match task.**>  
  2.   host 192.168.0.1  #####  elasticsearch 服务器地址
  3.   type elasticsearch  
  4.   logstash_format true  
  5.   flush_interval 5s  
  6.   include_tag_key true  
  7.   tag_key mapred  
  8. </match>  

中间涉及到使用elasticsearch,所以我们要安装
fluent-plugin-elasticsearch
/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-elasticsearch

发生错误:
ERROR:  Error installing fluent-plugin-elasticsearch:
    ERROR: Failed to build gem native extension.

        /usr/lib64/fluent/ruby/bin/ruby extconf.rb
checking for curl-config... no
checking for main() in -lcurl... no
*** 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
    --with-curl-dir
    --without-curl-dir
    --with-curl-include
    --without-curl-include=${curl-dir}/include
    --with-curl-lib
    --without-curl-lib=${curl-dir}/lib
    --with-curllib
    --without-curllib
extconf.rb:39:in `<main>':   Can't find libcurl or curl/curl.h (RuntimeError)
这个是由于我们没有安装 libcurl-devel造成的,我们只要先yum install  libcurl-devel,再次重新
/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-elasticsearch时就可以顺利进行下去。

如此,fluentd配置成功,可以启动了service td-agent start


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值