Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error #29

Open
235002 opened this issue Mar 18, 2020 · 5 comments
Open

Installation error #29

235002 opened this issue Mar 18, 2020 · 5 comments
Labels

Comments

@235002
Copy link

235002 commented Mar 18, 2020

I'm trying to install plugin and getting this occurrence. Is there any way to fix it?

root@ :/etc/td-agent# /usr/sbin/td-agent-gem install fluent-plugin-pgjson
Building native extensions.  This could take a while...
ERROR:  Error installing fluent-plugin-pgjson:
	ERROR: Failed to build gem native extension.

    current directory: /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/pg-1.2.2/ext
/opt/td-agent/embedded/bin/ruby -r ./siteconf20200318-15492-9vd899.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.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_BASE_NAME)
	--with-pg
	--without-pg
	--enable-windows-cross
	--disable-windows-cross
	--with-pg-config
	--without-pg-config
	--with-pg_config
	--without-pg_config
	--with-pg-dir
	--without-pg-dir
	--with-pg-include
	--without-pg-include=${pg-dir}/include
	--with-pg-lib
	--without-pg-lib=${pg-dir}/lib
/opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:468: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.4.0/mkmf.rb:599:in `try_cpp'
	from /opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:1160:in `block in find_header'
	from /opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:957:in `block in checking_for'
	from /opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:351:in `block (2 levels) in postpone'
	from /opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:321:in `open'
	from /opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:351:in `block in postpone'
	from /opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:321:in `open'
	from /opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:347:in `postpone'
	from /opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:956:in `checking_for'
	from /opt/td-agent/embedded/lib/ruby/2.4.0/mkmf.rb:1159:in `find_header'
	from extconf.rb:54:in `<main>'

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

  /opt/td-agent/embedded/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/pg-1.2.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/pg-1.2.2 for inspection.
Results logged to /opt/td-agent/embedded/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/pg-1.2.2/gem_make.out
@ButeForce
Copy link

I have the same error when I try to install it as part of helm chart on kubernetes , is it still available and supported ?

@ttsrg
Copy link

ttsrg commented Jul 15, 2020

I'm trying to install plugin and getting this occurrence. Is there any way to fix it?

root@ :/etc/td-agent# /usr/sbin/td-agent-gem install fluent-plugin-pgjson
Building native extensions.  This could take a while...
ERROR:  Error installing fluent-plugin-pgjson:
	ERROR: Failed to build gem native extension.

apt install make libffi-dev gcc (possible ruby-dev) may be helps you.

@ttsrg
Copy link

ttsrg commented Jul 15, 2020

or try install td-agent v4 instead of the more oldest

@ButeForce
Copy link

Hi I solved this issue by uninstalling the tzinfo-2.0.0 and depending on the installed version which comes with the connector. "gem uninstall tzinfo -v 2.0.2 " in the Dockerfile

@cosmo0920
Copy link
Member

This error should be occurred from lack of building toolchain such as gcc and make.
You must install C language development tools first.
This plugin depends on pg gem which contains C extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants