LCRL > OBS >

15-3. Plagger環境を作る その3

2007.02.11

環境:
・Debian GNU/Linux for ppc 2.4.20 #3
・perl, v5.8.4 built for powerpc-linux-thread-multi

基本的には『Software Design』2006年10月号の第2特集「俺流Plagger活用術」のChapter02を参照しながら、Plaggerに必要なモジュール群をインストールしました、続きです。

いくつもの問題を解決して、やっと終りが見えてきたところから、です。

続けて、p.80図11にあった、HTML関連のモジュールのインストール。

myserver:~# cpan -fi HTML::TreeBuilder < /dev/null
myserver:~# cpan -fi HTML::Scrubber
myserver:~# cpan -fi HTML::ResolveLink
相変わらずそれぞれに相応の時間がかかるものの、問題なく終了。
続けてp.80図11にあった、HTML関連のモジュールのインストール。リストの頭っからトライ。これも問題なく終るかと思ったが、
myserver:~# cpan -fi Encode::Builder < /dev/null
...
  Database was generated on Thu, 08 Feb 2007 05:09:21 GMT
Warning: Cannot install Encode::Builder, don't know what it is.
Try the command

    i /Encode::Builder/

to find objects with matching identifiers.
myserver:~#
どれ、言われたとおりにしてみる。
myserver:~# cpan
CPAN: File::HomeDir loaded ok

cpan shell -- CPAN exploration and modules installation (v1.8802)
ReadLine support enabled

cpan[1]>  i /Encode::Builder/
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Thu, 08 Feb 2007 05:09:21 GMT
No objects found of any type for argument /Encode::Builder/

cpan[2]> exit
Lockfile removed.
myserver:~#
おかしくなさそうなんだけどなー。
もういっかい試してみる。

うーん、だめだった。
Encode::Builderってどういうのなんだろうと思ってhttp://search.cpan.org/でEncode::Builderを探してみたんだけど、これが見つからなくって。

Encode::Builder

はインストールできませんでした。

これで、リストにあったのは、できなかったのもあるけど一応終了。いよいよPlaggerモジュールをインストールしてみる。
myserver:~# cpan Plagger < /dev/null
これがあまりにも時間がかかるので、走らせたまま寝てしまいました…。
寝ていたら、サーバから、タイムアウトでローカルの端末からのセッションが切られていました。
scriptでもしかけて置けばよかったな…。
まあ、成功しているものを信じることにする。

次に、最新のPlaggerのソースコードを、svnでチェックアウトしておく。
(え、ソースコードが必要なことってあるの?)
これは/usr/local/bin/perlの中に置いておく。
myserver:~# cd /usr/local/bin/perl/5.8.4
myserver:/usr/local/lib/perl/5.8.4/plagger#svn co http://svn.bulknews.net/repos/plagger/trunk/plagger
./plaggerを走らせてみます…!
myserver:/usr/local/lib/perl/5.8.4/plagger# ./plagger
Can't locate File/Find/Rule.pm in @INC 
(@INC contains: /usr/local/lib/perl/5.8.4/plagger/lib /etc/perl /usr/local/lib/perl/5.8.4 
/usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 
/usr/local/lib/site_perl .) at /usr/local/lib/perl/5.8.4/plagger/lib/Plagger.pm line 11.
BEGIN failed--compilation aborted at /usr/local/lib/perl/5.8.4/plagger/lib/Plagger.pm line 11.
Compilation failed in require at ./plagger line 8.
BEGIN failed--compilation aborted at ./plagger line 8.
myserver:/usr/local/lib/perl/5.8.4/plagger# 
Rule.pm、ないのならインストールしよう。
myserver:/usr/local/lib/perl/5.8.4# cpan -fi Test::File::Find::Rule
...
myserver:/usr/local/lib/perl/5.8.4/plagger# ./plagger
Can't locate MIME/Types.pm in @INC
 (@INC contains: /usr/local/lib/perl/5.8.4/plagger/lib /etc/perl /usr/local/lib/perl/5.8.4 
 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 
 /usr/local/lib/site_perl .) at /usr/local/lib/perl/5.8.4/plagger/lib/Plagger/Util.pm line 10.
BEGIN failed--
...
myserver:/usr/local/lib/perl/5.8.4/plagger# 
今度はTypes.pmかー。まあstep-by-step。
myserver:/usr/local/lib/perl/5.8.4/plagger# cpan -fi MIME::Types
...
myserver:/usr/local/lib/perl/5.8.4/plagger# ./plagger
Base class package "Template" is empty.
    (Perhaps you need to 'use' the module which defines that package first.)
 at /usr/local/lib/perl/5.8.4/plagger/lib/Plagger/Template.pm line 3
BEGIN failed--
...
myserver:/usr/local/lib/perl/5.8.4/plagger# 
今度は怒られ方がちがう。でもまあ、これがないんだな、と。
myserver:/usr/local/lib/perl/5.8.4/plagger# cpan -fi Template::Base
...
myserver:/usr/local/lib/perl/5.8.4/plagger# ./plagger
Can't locate Template/Provider/Encoding.pm in @INC 
(@INC contains: /usr/local/lib/perl/5.8.4/plagger/lib /etc/perl /usr/local/lib/perl/5.8.4 
/usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 
/usr/local/lib/site_perl .) at /usr/local/lib/perl/5.8.4/plagger/lib/Plagger/Template.pm line 8.
BEGIN failed--
...
はいはい。インストールしますします。
myserver:/usr/local/lib/perl/5.8.4/plagger# cpan -fi Template::Provider::Encoding
...
myserver:/usr/local/lib/perl/5.8.4/plagger# ./plagger
Plagger::ConfigLoader->load: /usr/local/lib/perl/5.8.4/plagger/config.yaml: No such 
file or directory at /usr/local/lib/perl/5.8.4/plagger/lib/Plagger.pm line 47
myserver:/usr/local/lib/perl/5.8.4/plagger# 
おお、いい傾向だ!
myserver:/usr/local/lib/perl/5.8.4/plagger# touch config.yaml
myserver:/usr/local/lib/perl/5.8.4/plagger# ./plagger
Plagger::Cache [error] Can't load Cache::FileCache. Fallbacks to Plagger::Cache::Null
Plagger [info] plugin Plagger::Plugin::Bundle::Defaults loaded.
Plagger [info] plugin Plagger::Plugin::Aggregator::Simple loaded.
Plagger [info] plugin Plagger::Plugin::Summary::Auto loaded.
Plagger [info] plugin Plagger::Plugin::Summary::Simple loaded.
Plagger [info] plugin Plagger::Plugin::Namespace::HatenaFotolife loaded.
Plagger [info] plugin Plagger::Plugin::Namespace::MediaRSS loaded.
Plagger [info] plugin Plagger::Plugin::Namespace::ApplePhotocast loaded.
myserver:/usr/local/lib/perl/5.8.4/plagger# 
言われたとおりにCache::FileCacheをインストールしますよ、ええ。
myserver:/usr/local/lib/perl/5.8.4/plagger# cpan -fi Cache::FileCache 
...
Checking for IPC::ShareLite... not found

  NOTE: Your system does not seem to have IPC::ShareLite installed.
  This module is a prerequisite for the SharedMemoryCache
  implementations.  However, since it is not available on all
  platforms, the Cache::Cache module does not list it as an explicit
  dependency.  If you are able to build IPC::ShareLite (available on
  CPAN), please install it now and re run this Makefile.PL.
  Automatically disabling the tests for the SharedMemoryCache.
...
だそうなので、ctr+Cで一旦Cache::FileCacheのインストールを中止して、、IPC::ShareLiteを先にインストールすることに。
myserver:/usr/local/lib/perl/5.8.4/plagger# cpan -fi IPC::ShareLite  
...
myserver:/usr/local/lib/perl/5.8.4/plagger# cpan -fi Cache::FileCache 
...
myserver:/usr/local/lib/perl/5.8.4/plagger# ./plagger
Plagger [info] plugin Plagger::Plugin::Bundle::Defaults loaded.
Plagger [info] plugin Plagger::Plugin::Aggregator::Simple loaded.
Plagger [info] plugin Plagger::Plugin::Summary::Auto loaded.
Plagger [info] plugin Plagger::Plugin::Summary::Simple loaded.
Plagger [info] plugin Plagger::Plugin::Namespace::HatenaFotolife loaded.
Plagger [info] plugin Plagger::Plugin::Namespace::MediaRSS loaded.
Plagger [info] plugin Plagger::Plugin::Namespace::ApplePhotocast loaded.
myserver:/usr/local/lib/perl/5.8.4/plagger# 
やったーーー!!!
インストールできないものもあったけど、一応これで、終了&成功です!!!


参考:

http://chalow.net/2006-09-24-1.html
「Software Design 2006年10月号のPlagger特集のメモ」
実際に試した方がいる、というのが励みになりました。

http://blog.livedoor.jp/hakin/archives/50690272.html
「Windowsで簡単にPlaggerをインストールする方法」
Windows環境の話ですが、テストコードなど参考になりました。

http://debian.fam.cx/index.php?AptGet
「apt-getの使い方」

http://docs.moodle.org/ja/Debian_GNU/Linux%E3%81%AE%E3%82%A4%E3%83%B3%E3%82%B9%
E3%83%88%E3%83%BC%E3%83%AB

「Debian GNU/Linuxのインストール」
aptitudebの使い方を参考にさせていただきました。

http://nakax.com/index.php?%A5%E1%A5%E2%2Fubuntu
「ubuntu server に Plaggerを入れてみるメモ」
debianと従兄弟みたいなディストリビューションubuntuにPlaggerをインストールしたときのメモ。
困ったところ、など、大変参考になりました。

http://d.hatena.ne.jp/emergent/20060925/1159112015
「たまごにほうれん草」
この方もdebianにplaggerをインストールしたとのことで、参考になります。その後の活用方法も。



Creative Commons License