34
27

More than 5 years have passed since last update.

Ubuntu 16.04 で mkmf.rb can't find header files が発生する

Last updated at Posted at 2017-10-05

こちらの記事 の Ubuntu 版です。
debug_inspector をインストールしようとすると mkmf.rb can't find header files for ruby が出ました。

% sudo gem install debug_inspector -v '0.0.2'
Fetching: debug_inspector-0.0.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing debug_inspector:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/debug_inspector-0.0.2/ext/debug_inspector
/usr/bin/ruby2.3 -r ./siteconf20171005-19309-25akqd.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.3.0/gems/debug_inspector-0.0.2 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/debug_inspector-0.0.2/gem_make.out

ruby-dev をインストールすると解決します。

% sudo apt-get install ruby-dev
% sudo gem install debug_inspector -v '0.0.2'
34
27
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
34
27