XMLパッケージのインストール
install.packages("XML")
として、RのXMLパッケージをインストールしようとしたら、
* installing *source* package ‘XML’ ... checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for sed... /bin/sed checking for pkg-config... /usr/bin/pkg-config checking for xml2-config... no Cannot find xml2-config ERROR: configuration failed for package ‘XML’ * removing ‘/home/yana/R/i486-pc-linux-gnu-library/2.10/XML’ ダウンロードされたパッケージは、以下にあります ‘/tmp/Rtmp9T3xeX/downloaded_packages’ 警告メッセージ: In install.packages("XML") : パッケージ 'XML' のインストールは、ゼロでない終了値をもちました
な感じでちゃんと入らなかった。よく読むと
checking for xml2-config... no Cannot find xml2-config
となってるんで、xml2-configでググってみると、libxml2-devを入れればいいらしいので
sudo aptitude install libxml2-dev
でlibxml2-devを入れた後,XMLを入れてうまくいった。