6
7

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 14.04 LTSにnokogiriインストール失敗する時

Last updated at Posted at 2015-09-22

今回、新たな環境を構築中にrailsをインストールしようと思った矢先、nokogiriのインストールで躓いた。
今回の対象とする環境は以下の通り

環境 ジージョン
マシン AzureVM
Linux Ubuntu 14.04 LTS
ruby ruby2.1.7

まず、目的の環境を作るためにはruby2.1.7をインストールする必要がある
初期状態のUbuntu 12.04 LTSの場合、1.6系列までしかapt-getで取得できないので、
aptレボジトリにbrightbox/ruby-ngを追加することで2系列のインストールが可能となります。

$ sudo add-apt-repository -y ppa:brightbox/ruby-ng $ sudo apt-get update $ sudo apt-get -y install ruby2.1

今回の主題通りnokogiriが失敗する要因としていろいろ入っていないことが要因なので、「いろいろ」をインストールする。

$ sudo apt-get install build-essential ruby2.1-dev zlib1g-dev libxslt1-dev

上記にて解決ができた。

オラの3時間返せー。鋸めぇぇぇってかbuild-essential入ってないとか…やっちまったなぁ。

参考URL
http://www.oiax.jp/rails/zakkan/apt-get-install-ruby2-1.html
http://www.nokogiri.org/tutorials/installing_nokogiri.html

6
7
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
6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?