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

Install failed on Ubuntu with Ruby 2.1 #641

Closed
gregelin opened this issue Apr 15, 2016 · 3 comments
Closed

Install failed on Ubuntu with Ruby 2.1 #641

gregelin opened this issue Apr 15, 2016 · 3 comments
Labels
Type: Bug Feature not working as expected

Comments

@gregelin
Copy link

Description

gem install inspec failed when ran as root on Ubuntu 15 with Ruby 2.1 installed.

InSpec and Platform Version

Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily

Replication Case

  1. Start with Ubuntu 15.10 64 bit on Digital Ocean
  2. Assume root
  3. Run apt-get update to update packages
  4. Run apt-get install ruby -y
  5. Check ruby version with ruby -v
  6. Run gem install inspec

Possible Solutions

I have not dug very deeply into the issue. It is possible I am missing dev tools on server, or ruby dev tools.

Stacktrace

root@kbs:~# which ruby
/usr/bin/ruby
root@kbs:~# ruby -v
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
root@kbs:~# gem install inspec
Fetching: excon-0.49.0.gem (100%)
Successfully installed excon-0.49.0
Fetching: docker-api-1.26.2.gem (100%)
Successfully installed docker-api-1.26.2
Fetching: mixlib-shellout-2.2.6.gem (100%)
Successfully installed mixlib-shellout-2.2.6
Fetching: bcrypt_pbkdf-1.0.0.alpha1.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing inspec:
    ERROR: Failed to build gem native extension.

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

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.1.0/gems/bcrypt_pbkdf-1.0.0.alpha1 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/bcrypt_pbkdf-1.0.0.alpha1/gem_make.out
@gregelin
Copy link
Author

gregelin commented Apr 15, 2016

Install error was result of not having ruby dev files and can be checked corrected with:

apt-get install ruby-dev

But an example execution then fails on same server. See issue #642.

@chris-rock
Copy link
Contributor

@gregelin Thank you very much for the feedback. I close this issue in favor for #646 Do not hesitate to reopen if required.

@arlimus
Copy link
Contributor

arlimus commented Apr 17, 2016

@gregelin We added instructions for installation from source to the readme:

apt-get -y install ruby ruby-dev gcc make

Feel free to reopen this if it still fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

No branches or pull requests

3 participants