26
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

posted at

updated at

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

こちらの記事 の 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'
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
26
Help us understand the problem. What are the problem?