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

missing dependencies for gem installation #1

Open
devoops0 opened this issue Aug 7, 2018 · 0 comments
Open

missing dependencies for gem installation #1

devoops0 opened this issue Aug 7, 2018 · 0 comments

Comments

@devoops0
Copy link

devoops0 commented Aug 7, 2018

Problem

gem install fluent-plugin-splunk-ex fails with the following message:

ERROR:  Error installing fluent-plugin-splunk-ex:
	ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h


Gem files will remain installed in /opt/app-root/src/gems/msgpack-0.5.12 for inspection.
Results logged to /opt/app-root/src/gems/msgpack-0.5.12/ext/msgpack/gem_make.out

Fix

The installation fails due to missing dependencies.
Dependencies can be resolved by installing gcc make ruby-devel

To acocmplish this, I had to adjust the Dockerfile like this:

FROM registry.access.redhat.com/openshift3/logging-fluentd:latest

RUN yum-config-manager --enable rhel-7-server-rpms rhel-7-server-optional-rpms

RUN yum install -y gcc make ruby-devel

RUN gem install -N --conservative --minimal-deps --no-document \
       'activesupport:<5' \
       fluent-plugin-secure-forward \
       fluent-plugin-kubernetes_metadata_filter \
       fluent-plugin-rewrite-tag-filter \
       fluent-plugin-secure-forward \
       fluent-plugin-remote_syslog \
       fluent-plugin-record-modifier \
       fluent-plugin-splunk-ex

RUN yum remove gcc make ruby-devel

RUN yum autoclean

RUN yum-config-manager --disable rhel-7-server-rpms rhel-7-server-optional-rpms

RUN rm -rf /var/cache/yum/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant