Plaggerを入れるまで その1 XML::LibXML

OOがまだまだなところで、Plaggerを使って勉強しようと思います。
でも、依存モジュールが多くてなかなか敷居が高くないですか。
うちの環境だけ?

依存モジュールは、cpan.orgにて確認。
Plaggerメインから、Dependencies を見ながら。ちょっとつづまとめてモジュールを入れていきます。

インストールエラーになりました、その1。


CPAN Terminal> i XML::LibXML

Installing XML::LibXML (1.66)
Running [/usr/local/bin/perl /usr/local/bin/cpanp-run-perl /root/.cpanplus/5.10.0/
build/XML-LibXML-1.66/Makefile.PL ]...
enable native perl UTF8
running xml2-config...The installed version of libxml2 not compatible with XML::LibXML.

You may continue at your own risk, but:

- don't expect XML::LibXML to build or work correctly!
- don't report errors!
- don't send patches!

Check the README file for more information on versions
that are tested with XML::LibXML

failed
[ERROR] File '/root/.cpanplus/5.10.0/build/XML-LibXML-1.66/Makefile' is not
readable or does not exist

Key 'file' (/root/.cpanplus/5.10.0/build/XML-LibXML-1.66/Makefile) is of invalid type
for 'CPANPLUS::Dist::MM::_find_prereqs' provided by CPANPLUS::Dist::MM::prepare at
/usr/local/lib/perl5/5.10.0/CPANPLUS/Module.pm line 684
[ERROR] Unable to scan '/root/.cpanplus/5.10.0/build/XML-LibXML-1.66/Makefile' for prereqs

[ERROR] Unable to create a new distribution object for 'XML::LibXML' -- cannot continue

*** Install log written to:
/root/.cpanplus/install-logs/XML-LibXML-1.66-1214456233.log

Error installing 'XML::LibXML'
Problem installing one or more modules
*** You can view the complete error buffer by pressing 'p' ***

とりあえず、README を読んでみる。


CPAN Terminal> help
...
l MODULE | NUMBER ... # display detailed information about module(s)
r MODULE | NUMBER ... # display README files of module(s)
c MODULE | NUMBER ... # check for module report(s) from cpan-testers
z MODULE | NUMBER ... # extract module(s) and open command prompt
...
CPAN Terminal> r XML::LibXML

INTRODUCTION
============

This module implements a Perl interface to the Gnome libxml2 library which
provides interfaces for parsing and manipulating XML files. This module allows
Perl programmers to make use of the highly capable validating XML parser and
the high performance DOM implementation.
...
As of XML::LibXML 1.61, only versions 2.6.16 and higher are supported.
...

XML 周りがさっぱりです。"libxml2"ってperlとは関連ではないよね?
とりあえず、こいつのバージョンっぽいな。


# /usr/bin/xml2-config --version
2.6.10

ってことでパッケージ探していれます。別にソースからでもよいとは思ったが。
Sunfreewareにありました。
こいつらは、/usr/local に入ります。


# wget http://*****/platform/sun/solaris/freeware/sparc/10/libxml2-2.6.31-sol10-sparc-local.gz
# gzip -d libxml2-2.6.31-sol10-sparc-local.gz
# pkgadd -d ./libxml2-2.6.31-sol10-sparc-local

The following packages are available:
1 SMClxml2 libxml2
(sparc) 2.6.31
...

この後は、無事 cpanplus からの i XML::LibXML で完了。