流れ
[~]# yum install perl-CPAN
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
[省略]
Installed:
perl-CPAN.x86_64 0:1.9402-136.el6
Dependency Installed:
db4-cxx.x86_64 0:4.7.25-18.el6_4 db4-devel.x86_64 0:4.7.25-18.el6_4 gdbm-devel.x86_64 0:1.8.0-36.el6 perl-Digest-SHA.x86_64 1:5.47-136.el6
perl-ExtUtils-MakeMaker.x86_64 0:6.55-136.el6 perl-ExtUtils-ParseXS.x86_64 1:2.2003.0-136.el6 perl-Test-Harness.x86_64 0:3.17-136.el6 perl-devel.x86_64 4:5.10.1-136.el6
[~]# yum install perl-Module-Build
Loaded plugins: fastestmirror
No such command: isntall. Please use /usr/bin/yum --help
[省略]
Installed:
perl-Module-Build.x86_64 1:0.3500-136.el6
Dependency Installed:
perl-Archive-Tar.x86_64 0:1.58-136.el6 perl-ExtUtils-CBuilder.x86_64 1:0.27-136.el6 perl-IO-Zlib.x86_64 1:1.09-136.el6 perl-Package-Constants.x86_64 1:0.02-136.el6
[~]# cpan
CPAN is the world-wide archive of perl resources. It consists of about
300 sites that all replicate the same contents around the globe. Many
countries have at least one CPAN site already. The resources found on
CPAN are easily accessible with the CPAN.pm module. If you want to use
CPAN.pm, lots of things have to be configured. Fortunately, most of
them can be determined automatically. If you prefer the automatic
configuration, answer 'yes' below.
If you prefer to enter a dialog instead, you can answer 'no' to this
question and I'll let you configure in small steps one thing after the
other. (Note: you can revisit this dialog anytime later by typing 'o
conf init' at the cpan prompt.)
Would you like me to configure as much as possible automatically? [yes]
※Enterキー叩いて流れるログを眺める
[省略]
cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.
cpan[3]> install Web::Scraper
Running install for module 'Web::Scraper'
CPAN: Data::Dumper loaded ok (v2.124)
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for M/MI/MIYAGAWA/Web-Scraper-0.37.tar.gz
※このさきいろんな依存モジュールもインストールする必要があるので全部イエスで
ちなみに1回めはインストールはこけた
Failed during this command:
INGY/Spiffy-0.46.tar.gz : make_test NO
OVID/Text-Diff-1.41.tar.gz : make_test NO
INGY/Test-Base-0.88.tar.gz : make_test NO
BINGOS/ExtUtils-MakeMaker-6.98.tar.gz : make_test NO
INGY/Test-YAML-1.05.tar.gz : make_test NO one dependency not OK (Test::Base)
INGY/YAML-1.12.tar.gz : make_test NO
CORION/HTML-Selector-XPath-0.18.tar.gz : make_test NO
MIYAGAWA/Web-Scraper-0.37.tar.gz : make_test NO
※再チャレンジ
cpan[4]> install Web::Scraper
Running install for module 'Web::Scraper'
Running make for M/MI/MIYAGAWA/Web-Scraper-0.37.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Web-Scraper-0.37-TtCFJn
[省略]
Installing /usr/local/share/perl5/Web/Scraper.pm
Installing /usr/local/share/perl5/Web/Scraper/Filter.pm
Installing /usr/local/share/perl5/Web/Scraper/LibXML.pm
Installing /usr/local/share/man/man3/Web::Scraper::LibXML.3pm
Installing /usr/local/share/man/man3/Web::Scraper::Filter.3pm
Installing /usr/local/share/man/man3/Web::Scraper.3pm
Installing /usr/local/bin/scraper
Appending installation info to /usr/lib64/perl5/perllocal.pod
MIYAGAWA/Web-Scraper-0.37.tar.gz
/usr/bin/make install -- OK
※無事入った模様
cpan[5]> m Web::Scraper
Module id = Web::Scraper
CPAN_USERID MIYAGAWA (Tatsuhiko Miyagawa <miyagawa@bulknews.net>)
CPAN_VERSION 0.37
CPAN_FILE M/MI/MIYAGAWA/Web-Scraper-0.37.tar.gz
UPLOAD_DATE 2012-10-19
MANPAGE Web::Scraper - Web Scraping Toolkit using HTML and CSS Selectors or XPath expressions
INST_FILE /usr/local/share/perl5/Web/Scraper.pm
INST_VERSION 0.37
※一回めこけた理由についてはログをちゃんと追わないとわからないっぽい