15
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ubuntuでknife-soloをインストールするときにエラー

Last updated at Posted at 2014-11-06

ubuntuでknife-soloをインストールしようとして下記のエラーが出てしまいました。

Building native extensions.  This could take a while...
ERROR:  Error installing knife-solo:
	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/libyajl2-1.1.0 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86-linux/2.1.0/libyajl2-1.1.0/gem_make.out

下記を実行で解決
sudo apt-get install ruby2.1-dev

ネット上で sudo apt-get install ruby-dev とすれば解決と書いてあったが、実行してもruby-dev は既に最新バージョンですと出るのみ。
もっと調べたところ ruby2.1-dev も必要だったようです。

ちなみにこれでbundleのエラーも出なくなりました。

15
12
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
15
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?