Problem with installing a gem

1,878 views
Skip to first unread message

Kellan Strong

unread,
Feb 10, 2015, 6:59:28 PM2/10/15
to flu...@googlegroups.com
Hello All,
I am receiving this error for secure forward on some of my boxes. This doesn't happen on my other servers with the same layout. I am trying to figure out if there is a package missing or something. Any help would be appreciated.

The servers are running squeeze 6. While the working servers are squeeze 6 as well.

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

        /opt/td-agent/embedded/bin/ruby 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
    --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
/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:587:in `try_cpp'
    from /opt/td-agent/embedded/lib/ruby/2.1.0/mkmf.rb:1067:in `block in have_header'
    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:1066:in `have_header'
    from extconf.rb:3:in `<main>'


Gem files will remain installed in /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/msgpack-0.5.11 for inspection.
Results logged to /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/msgpack-0.5.11/ext/msgpack/gem_make.out

Kazuki Ohta

unread,
Feb 11, 2015, 3:00:55 AM2/11/15
to flu...@googlegroups.com
Could you check your mkmf.log?

> 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.

Need more information to solve your problem.



==
Kazuki Ohta | Founder and CTO, Treasure Data
Follow us:    Watch our latest intro video

--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mr. Fiber

unread,
Feb 11, 2015, 8:22:36 AM2/11/15
to flu...@googlegroups.com
You have to install development tools first.

From this message, I assume you don't install development tools package.
td-agent 2 itself doesn't require such tools in dependencies.
So if you want to install gem library which has C extension,
you should install development tools before.


Masahiro
Message has been deleted

Chris Riddell

unread,
Oct 20, 2015, 8:41:06 PM10/20/15
to Fluentd Google Group
Had the same issue -

I was using gem instead of td-agent-gem to install with.

If that was not your problem, try yum install -y ruby-devel gcc and try again
Reply all
Reply to author
Forward
0 new messages