Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
12
Help us understand the problem. What is going on with this article?
@mrmr

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

More than 5 years have passed since last update.

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のエラーも出なくなりました。

12
Help us understand the problem. What is going on with this article?
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
mrmr

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
12
Help us understand the problem. What is going on with this article?