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

Cannot install on CentOS 7 #1609

Closed
lukehinds opened this issue Mar 30, 2017 · 2 comments
Closed

Cannot install on CentOS 7 #1609

lukehinds opened this issue Mar 30, 2017 · 2 comments

Comments

@lukehinds
Copy link

Description

Cannot install to CentOS7

InSpec and Platform Version

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"

Replication Case

gem install inspec fails

ERROR:  Error installing inspec:
ERROR: Failed to build gem native extension.

Full stack trace below.

Possible Solutions

I have suspicions this might be from the requirement to use ruby 2.2.

I am hoping not, as this means removing not only ruby, but puppet and a ton of other dependencies to manually install a later version of ruby, as the CentOS repos are still using 2.0.

Stacktrace

/home/luke/.gem/ruby/gems/rainbow-2.2.1/spec/unit/string_utils_spec.rb
/home/luke/.gem/ruby/gems/rainbow-2.2.1/spec/unit/wrapper_spec.rb
Building native extensions.  This could take a while...
/usr/bin/ruby mkrf_conf.rb
rake RUBYARCHDIR=/home/luke/.gem/ruby/gems/rainbow-2.2.1/lib RUBYLIBDIR=/home/luke/.gem/ruby/gems/rainbow-2.2.1/lib
ERROR:  Error installing inspec:
	ERROR: Failed to build gem native extension.

    Building has failed. See above output for more information on the failure.
@lukehinds
Copy link
Author

Just read 2.0 is end of life, so will close this as its not an issue for you to have to resolve.

@adamleff
Copy link
Contributor

@lukehinds the stacktrace and error isn't complete enough to determine what the problem is unfortunately. I suspect it's because gcc or other required libs aren't available for building the rainbow gem.

That said, with the InSpec release scheduled for today, our minimum Ruby version will be 2.1 because some dependencies (nokogiri, specifically) has a minimum version of 2.1, and Ruby 2.0 is end-of-life.

If you have an issue which requires you to keep Ruby 2.0 as your primary Ruby on your system, I'd like to recommend you install InSpec via our omnibus packages at https://downloads.chef.io/inspec. These packages are available for a number of OSs using the OS-native package format and include their own Ruby which will not conflict with the system Ruby.

Thank you for submitting this issue! I hope the omnibus packages can help you! If not, please ask for this issue to be reopened and we're happy to help troubleshoot as we're able.

~Adam

@adamleff adamleff self-assigned this Mar 30, 2017
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

2 participants