LoginSignup
0
0

More than 5 years have passed since last update.

Mac OS X 10.9.5 上でNokogiriのインストールに失敗した話

Posted at

InfratasterをMac OS X上にインストールしようとして依存してるnokogiriのインストールに失敗しまくったので、まずはnokogiri単体でインストールできる手段を調査.

ライブラリ足りない感じに見えたので以下を試す。

$ brew install libxml2 libxslt libiconv     
$ brew link --force libxml2           
$ brew link --force libxslt            

駄目だった。

以下も試したけど駄目だった。

$brew unlink gcc-4.2      # you might not need this step
$gem uninstall nokogiri
$xcode-select --install
$gem install nokogiri

これも駄目だった。

$brew unlink libxml2
$brew unlink libxslt
$brew unlink libiconv
$sudo xcode-select --install
$gem install nokogiri

最終的にgithubのコメントを参考に以下でいけたけど、最終的に必要だった作業が不明。ここで書いてない事もやったかも。

$sudo gem install nokogiri -- --use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib/

上記でいけたので、以下の設定をしてbundle installで無事infratasterのインストールに成功.

$bundle config build.nokogiri '--use-system-libraries --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib/'
$bundle install --path vendor/bundle
0
0
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
0
0