読者です 読者をやめる 読者になる 読者になる

NeverBlog::Likk::Unexistable;

見なかったことにして下さい

String::Trigram

livedoor Techブログ : String::Trigram でテキストの類似度を測るを読んで、とりあえずString::trigramインスコを試みる。

wget http://search.cpan.org/CPAN/authors/id/T/TA/TAREKA/String-Trigram-0.1.tar.gz
tar xvzf ./String-Trigram-0.1.tar.gz
cd ./String-Trigram-0.1
perl ./Makefile.PM
make

が、makeでコケる。
じゃなくてをincludeしてねみたいなエラーが出てきたので、
./Trigram.xs ./Trigram.c のに書き換えてmake
例によってmakefileを弄り倒して、
make test
make install
でインスコ完了。

編集後のMakefileのdiff (一行目の/home/usrlibdir はレンサバユーザLib領域名が入りますす。)

29a30
> USRLIBDIR = の/home/usrlibdir
33c34
< CCDLFLAGS =   -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE
---
> CCDLFLAGS =   -Wl,-R$(USRLIBDIR)/lib/perl5/5.8.8/mach/CORE
45,46c46,47
< SITELIBEXP = /usr/local/lib/perl5/site_perl/5.8.8
< SITEARCHEXP = /usr/local/lib/perl5/site_perl/5.8.8/mach
---
> SITELIBEXP = $(USRLIBDIR)/lib/perl5/site_perl/5.8.8
> SITEARCHEXP = $(USRLIBDIR)/lib/perl5/site_perl/5.8.8/mach
77c78
< PREFIX = /usr/local
---
> PREFIX = $(USRLIBDIR)
79c80
< SITEPREFIX = /usr/local
---
> SITEPREFIX = $(USRLIBDIR)
81c82
< INSTALLPRIVLIB = /usr/local/lib/perl5/5.8.8
---
> INSTALLPRIVLIB = $(USRLIBDIR)/lib/perl5/5.8.8
83c84
< INSTALLSITELIB = /usr/local/lib/perl5/site_perl/5.8.8
---
> INSTALLSITELIB = $(USRLIBDIR)/lib/perl5/site_perl/5.8.8
87c88
< INSTALLARCHLIB = /usr/local/lib/perl5/5.8.8/mach
---
> INSTALLARCHLIB = $(USRLIBDIR)/lib/perl5/5.8.8/mach
89c90
< INSTALLSITEARCH = /usr/local/lib/perl5/site_perl/5.8.8/mach
---
> INSTALLSITEARCH = $(USRLIBDIR)/lib/perl5/site_perl/5.8.8/mach
93c94
< INSTALLBIN = /usr/local/bin
---
> INSTALLBIN = $(USRLIBDIR)/bin
95c96
< INSTALLSITEBIN = /usr/local/bin
---
> INSTALLSITEBIN = $(USRLIBDIR)/bin
99c100
< INSTALLSCRIPT = /usr/local/bin
---
> INSTALLSCRIPT = $(USRLIBDIR)/bin
101c102
< INSTALLMAN1DIR = /usr/local/man/man1
---
> INSTALLMAN1DIR = $(USRLIBDIR)/man/man1
103c104
< INSTALLSITEMAN1DIR = /usr/local/man/man1
---
> INSTALLSITEMAN1DIR = $(USRLIBDIR)/man/man1
107c108
< INSTALLMAN3DIR = /usr/local/lib/perl5/5.8.8/perl/man/man3
---
> INSTALLMAN3DIR = $(USRLIBDIR)/lib/perl5/5.8.8/perl/man/man3
109c110
< INSTALLSITEMAN3DIR = /usr/local/lib/perl5/5.8.8/man/man3
---
> INSTALLSITEMAN3DIR = $(USRLIBDIR)/lib/perl5/5.8.8/man/man3
113,114c114,115
< PERL_LIB = /usr/local/lib/perl5/5.8.8
< PERL_ARCHLIB = /usr/local/lib/perl5/5.8.8/mach
---
> PERL_LIB = $(USRLIBDIR)/lib/perl5/5.8.8
> PERL_ARCHLIB = $(USRLIBDIR)/lib/perl5/5.8.8/mach