taoru's memo

Objective-c,cocos2d,など開発についてのメモ(andoroidも少しだけ)

Ruby/Mechanizeをインストールするときにはまった

Portable Ubuntu for Windows上での作業です。



gemでMechanizeをインストールした。ときに少しはまった。

sudo gem install mechanize

すると、

-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

ってエラーが出てインストールできなかった。

libxml2が無いのね、って思ったので
言われたとおり
http://nokogiri.org/tutorials/installing_nokogiri.html
を確認する。

sudo apt-get install libxslt-dev libxml2-dev

その後、もう一度

sudo gem install mechanize

したら正常にインストールされた。
ついでにnokogiriもインストールされてた。

2011/4/29現在では

mechanize (1.0.0)
nokogiri (1.4.4)

QLOOKアクセス解析