fabric8io / fluent-plugin-kubernetes_metadata_filter

Enrich your fluentd events with Kubernetes metadata
Apache License 2.0
351 stars 167 forks source link

ERROR: Failed to build gem native extension. #52

Closed overip closed 7 years ago

overip commented 7 years ago

Hello everybody, I am getting the following error when I try the installation

gem install fluent-plugin-kubernetes_metadata_filter Fetching: msgpack-1.0.2.gem (100%) Building native extensions. This could take a while... ERROR: Error installing fluent-plugin-kubernetes_metadata_filter: ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/msgpack-1.0.2/ext/msgpack

/usr/bin/ruby2.3 -r ./siteconf20161219-10470-1ybqy2t.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/msgpack-1.0.2 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/msgpack-1.0.2/gem_make.out

Do you have any idea on the reasons why this is happening?

Thank you so much.

jimmidyson commented 7 years ago

You need to have the ruby-dev or ruby-devel package installed to compile native extensions.

overip commented 7 years ago

I have installed gem and ruby-dev and I still get the following error

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

current directory: /var/lib/gems/2.3.0/gems/msgpack-1.0.2/ext/msgpack

/usr/bin/ruby2.3 -r ./siteconf20161219-27460-lhpx8l.rb extconf.rb checking for ruby/st.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 --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/bin/$(RUBY_BASE_NAME)2.3 /usr/lib/ruby/2.3.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/lib/ruby/2.3.0/mkmf.rb:587:intry_cpp' from /usr/lib/ruby/2.3.0/mkmf.rb:1091:in block in have_header' from /usr/lib/ruby/2.3.0/mkmf.rb:942:inblock in checking_for' from /usr/lib/ruby/2.3.0/mkmf.rb:350:in block (2 levels) in postpone' from /usr/lib/ruby/2.3.0/mkmf.rb:320:inopen' from /usr/lib/ruby/2.3.0/mkmf.rb:350:in block in postpone' from /usr/lib/ruby/2.3.0/mkmf.rb:320:inopen' from /usr/lib/ruby/2.3.0/mkmf.rb:346:in postpone' from /usr/lib/ruby/2.3.0/mkmf.rb:941:inchecking_for' from /usr/lib/ruby/2.3.0/mkmf.rb:1090:in have_header' from extconf.rb:3:in

'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/msgpack-1.0.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/msgpack-1.0.2 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/msgpack-1.0.2/gem_make.out root@ip-10-43-0-30:/home/ubuntu# cat /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/msgpack-1.0.2/mkmf.log

richm commented 7 years ago

@overip