Posted at

ubuntu14.04にruggedをインストールする

More than 3 years have passed since last update.


環境


  • ubuntu 14.04


Problem

$ sudo gem install rugged -v '0.24.0b12'

Building native extensions. This could take a while...
ERROR: Error installing rugged:
ERROR: Failed to build gem native extension.

/usr/bin/ruby2.2 -r ./siteconf20160418-27436-1orik58.rb 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.2.0/gems/rugged-0.24.0b12 for inspection.
Results logged to /var/lib/gems/2.2.0/extensions/x86_64-linux/2.2.0/rugged-0.24.0b12/gem_make.out


Solution

cmakeとruby2.2-devをインストールする(ruby2.1をつかっているならruby2.1-devをインストールするとよいと思う)

$ sudo apt-get install cmake

$ sudo apt-get install ruby2.2-dev

再度インストール

$ sudo gem install rugged -v '0.24.0b12'

Building native extensions. This could take a while...
Successfully installed rugged-0.24.0b12
Parsing documentation for rugged-0.24.0b12
Installing ri documentation for rugged-0.24.0b12
Done installing documentation for rugged after 2 seconds
1 gem installed