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

gem install failure on RHEL 7.2 Ruby 2.0 #653

Closed
DonPwrShellHunt opened this issue Apr 17, 2016 · 3 comments
Closed

gem install failure on RHEL 7.2 Ruby 2.0 #653

DonPwrShellHunt opened this issue Apr 17, 2016 · 3 comments

Comments

@DonPwrShellHunt
Copy link

Description

The documented way to install inSpec fails on a fresh install of RHEL 7.2
Similar to #641

README indicates that inSpec requires ruby (>1.9)
and lists the following command to install via rubygems.org
gem install inspec

The failure output I received follows:
# gem install inspec

.
.
Building native extensions.  This could take a while...
ERROR:  Error installing inspec:
    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 /usr/local/share/gems/gems/json-1.8.3 for inspection.
Results logged to /usr/local/share/gems/gems/json-1.8.3/ext/json/ext/generator/gem_make.out

InSpec and Platform Version

$ inspec version
0.18.0

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)

Replication Case

Attempt install using gem method without ruby-devel being installed

Possible Solutions

yum install ruby-devel

@arlimus
Copy link
Contributor

arlimus commented Apr 17, 2016

@DonPwrShellHunt We added instructions for installation requirements to the readme:

yum -y install ruby ruby-devel make gcc

Feel free to reopen if this still fails. Tested on CentOS 7.2.1511

Thank you for reporting this issue! 😄

@rameshVeeramani
Copy link

Well in my case there were serveral issues with installation of ruby, versioning .

Followed the steps https://tecadmin.net/install-ruby-latest-stable-centos/ and it fixed the issue

@glasgowm148
Copy link

glasgowm148 commented Feb 28, 2020

@DonPwrShellHunt We added instructions for installation requirements to the readme:

yum -y install ruby ruby-devel make gcc

Feel free to reopen if this still fails. Tested on CentOS 7.2.1511

Thank you for reporting this issue! 😄

This fixed my issue on CentOS8.

While troubleshooting I got this, figure it may mean more to you.

❯ dnf -y install ruby`ruby -e 'puts RUBY_VERSION[/\d+\.\d+/]'`-dev
Last metadata expiration check: 0:01:24 ago on Fri 28 Feb 2020 11:56:47 UTC.
No match for argument: ruby2.5-dev
Error: Unable to find a match: ruby2.5-dev

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

4 participants