形態素解析をperlで行うモジュールを見つけた(今さらですが)
[root@localhost ~]# cpan
cpan[1]> install Text::MeCab
CPAN: Storable loaded ok (v2.18)
Going to read /root/.cpan/Metadata
Database was generated on Sun, 24 Aug 2008 04:02:47 GMT
Running install for module ‘Text::MeCab’
Running make for D/DM/DMAKI/Text-MeCab-0.20007.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
CPAN: Compress::Zlib loaded ok (v2.012)
Checksum for /root/.cpan/sources/authors/id/D/DM/DMAKI/Text-MeCab-0.20007.tar.gz ok
Scanning cache /root/.cpan/build for sizes
………………………………………………………………….DONE
Text-MeCab-0.20007/
・
・
・
Text-MeCab-0.20007/typemap
CPAN: File::Temp loaded ok (v0.20)
CPAN: YAML loaded ok (v0.66)
CPAN.pm: Going to build D/DM/DMAKI/Text-MeCab-0.20007.tar.gz
Path to mecab config? ←何スか?
Can’t proceed without mecab-config. Aborting…
Warning: No success on command[/usr/bin/perl Makefile.PL]
DMAKI/Text-MeCab-0.20007.tar.gz
/usr/bin/perl Makefile.PL — NOT OK
Running make test
Make had some problems, won’t test
Running make install
Make had some problems, won’t install
Failed during this command:
DMAKI/Text-MeCab-0.20007.tar.gz : writemakefile NO ‘/usr/bin/perl Makefile.PL’ returned status 256
スポンサードリンク
◆CentOS5でのyum提供はないらしいので、tarボールからRPMファイルを作る(断念)
[root@localhost ~]# rpm -ivh http://www.rukatan.com/mecab-0.96-2.i386.rpm
http://www.rukatan.com/mecab-0.96-2.i386.rpm を取得中
準備中… ########################################### [100%]
1:mecab ########################################### [100%]
[root@localhost ~]# rpm -ivh http://www.rukatan.com/mecab-devel-0.96-2.i386.rpm
http://www.rukatan.com/mecab-devel-0.96-2.i386.rpm を取得中
準備中… ########################################### [100%]
1:mecab-devel ########################################### [100%]
◆rpm -ivh http://www.rukatan.com/mecab-ipadic-2.7.0.20070801-2.i386.rpm これがないらしいので作る
# wget ftp://194.199.20.114/linux/fedora/extras/development/SRPMS/mecab-ipadic-2.7.0.20060707-2.fc7.src.rpm
# rpm -i mecab-ipadic-2.7.0.20060707-2.fc7.src.rpm
# wget mecab-ipadic-2.7.0-20070801.tar.gz
# cp mecab-ipadic-2.7.0-20070801.tar.gz /usr/src/redhat/SOURCES/.
# cd /usr/src/redhat/SPECS/
# cp mecab-ipadic.spec mecab-ipadic-2.7.0-20070801.spec
# rpmbuild -bb mecab-ipadic-2.7.0-20070801.spec
# cd /usr/src/redhat/RPMS/i386
# rpm -ivh mecab-ipadic-2.7.0.20070801-2.i386.rpm
[root@localhost ~]# wget http://internap.dl.sourceforge.net/sourceforge/mecab/me
cab-ipadic-2.7.0-20070801.tar.gz
–02:06:40– http://internap.dl.sourceforge.net/sourceforge/mecab/mecab-ipadic-2.7.0-20070801.tar.gz
internap.dl.sourceforge.net をDNSに問いあわせています… 64.7.222.131
internap.dl.sourceforge.net|64.7.222.131|:80 に接続しています… 接続しました。
HTTP による接続要求を送信しました、応答を待っています… 200 OK
長さ: 12208105 (12M) [application/x-tar]
Saving to: `mecab-ipadic-2.7.0-20070801.tar.gz’
100%[=======================================>] 12,208,105 1.33M/s in 12s
02:06:54 (967 KB/s) – `mecab-ipadic-2.7.0-20070801.tar.gz’ を保存しました [12208105/12208105]
[root@localhost ~]# # cp mecab-ipadic-2.7.0-20070801.tar.gz /usr/src/redhat/SOUR
CES/.
[root@localhost ~]# cd /usr/src/redhat/SPECS/
[root@localhost SPECS]# cp mecab-ipadic.spec mecab-ipadic-2.7.0-20070801.spec
[root@localhost SPECS]# rpmbuild -bb mecab-ipadic-2.7.0-20070801.spec
実行中(%prep): /bin/sh -e /var/tmp/rpm-tmp.24883
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf mecab-ipadic-2.7.0-20070801
+ /bin/gzip -dc /usr/src/redhat/SOURCES/mecab-ipadic-2.7.0-20070801.tar.gz
+ tar -xf –
+ STATUS=0
+ ‘[‘ 0 -ne 0 ‘]’
+ cd mecab-ipadic-2.7.0-20070801
++ /usr/bin/id -u
+ ‘[‘ 0 = 0 ‘]’
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ ‘[‘ 0 = 0 ‘]’
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
実行中(%build): /bin/sh -e /var/tmp/rpm-tmp.74094
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd mecab-ipadic-2.7.0-20070801
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables’
+ export CFLAGS
+ CXXFLAGS=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables’
+ export CXXFLAGS
+ FFLAGS=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables’
+ export FFLAGS
++ find . -name config.guess -o -name config.sub
+ for i in ‘$(find . -name config.guess -o -name config.sub)’
++ basename ./config.sub
+ ‘[‘ -f /usr/lib/rpm/redhat/config.sub ‘]’
+ /bin/rm -f ./config.sub
++ basename ./config.sub
+ /bin/cp -fv /usr/lib/rpm/redhat/config.sub ./config.sub
`/usr/lib/rpm/redhat/config.sub’ -> `./config.sub’
+ for i in ‘$(find . -name config.guess -o -name config.sub)’
++ basename ./config.guess
+ ‘[‘ -f /usr/lib/rpm/redhat/config.guess ‘]’
+ /bin/rm -f ./config.guess
++ basename ./config.guess
+ /bin/cp -fv /usr/lib/rpm/redhat/config.guess ./config.guess
`/usr/lib/rpm/redhat/config.guess’ -> `./config.guess’
+ ./configure –build=i686-redhat-linux-gnu –host=i686-redhat-linux-gnu –target=i386-redhat-linux-gnu –program-prefix= –prefix=/usr –exec-prefix=/usr –bindir=/usr/bin –sbindir=/usr/sbin –sysconfdir=/etc –datadir=/usr/share –includedir=/usr/include –libdir=/usr/lib –libexecdir=/usr/libexec –localstatedir=/var –sharedstatedir=/usr/com –mandir=/usr/share/man –infodir=/usr/share/info –with-mecab-config=/usr/bin/mecab-config –with-charset=utf8
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking whether make sets $(MAKE)… yes
checking for working aclocal-1.4… found
checking for working autoconf… found
checking for working automake-1.4… found
checking for working autoheader… found
checking for working makeinfo… found
checking for a BSD-compatible install… /usr/bin/install -c
using /usr/bin/mecab-config for mecab-config
configure: creating ./config.status
config.status: creating Makefile
+ /usr/bin/make
/usr/libexec/mecab/mecab-dict-index -d . -o . -f EUC-JP -t utf8
reading ./unk.def … 40
emitting double-array: 100% |###########################################|
reading ./Noun.adjv.csv … 3328
reading ./Noun.verbal.csv … 12146
reading ./Suffix.csv … 1393
reading ./Auxil.csv … 199
reading ./Adj.csv … 27210
reading ./Noun.proper.csv … 27327
reading ./Postp-col.csv … 91
reading ./Symbol.csv … 208
reading ./Others.csv … 2
reading ./Adverb.csv … 3032
reading ./Noun.adverbal.csv … 795
reading ./Noun.org.csv … 16668
reading ./Noun.demonst.csv … 120
reading ./Verb.csv … 130750
reading ./Conjunction.csv … 171
reading ./Noun.name.csv … 34202
reading ./Noun.number.csv … 42
reading ./Adnominal.csv … 135
reading ./Filler.csv … 19
reading ./Postp.csv … 146
reading ./Noun.place.csv … 72999
reading ./Noun.others.csv … 151
reading ./Noun.nai.csv … 42
reading ./Interjection.csv … 252
reading ./Prefix.csv … 221
reading ./Noun.csv … 60477
emitting double-array: 100% |###########################################|
reading ./matrix.def … 1316×1316
emitting matrix : 100% |###########################################|
done!
echo To enable dictionary, rewrite /etc/mecabrc as \”dicrc = /usr/lib/mecab/dic/ipadic\”
To enable dictionary, rewrite /etc/mecabrc as “dicrc = /usr/lib/mecab/dic/ipadic”
+ /bin/mkdir UTF-8
+ /bin/cp -p char.bin matrix.bin sys.dic unk.dic char.def feature.def left-id.def matrix.def pos-id.def rewrite.def right-id.def unk.def dicrc UTF-8/
+ /usr/bin/make clean
test -z “matrix.bin char.bin sys.dic unk.dic” || rm -f matrix.bin char.bin sys.dic unk.dic
+ CFLAGS=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables’
+ export CFLAGS
+ CXXFLAGS=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables’
+ export CXXFLAGS
+ FFLAGS=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables’
+ export FFLAGS
++ find . -name config.guess -o -name config.sub
+ for i in ‘$(find . -name config.guess -o -name config.sub)’
++ basename ./config.sub
+ ‘[‘ -f /usr/lib/rpm/redhat/config.sub ‘]’
+ /bin/rm -f ./config.sub
++ basename ./config.sub
+ /bin/cp -fv /usr/lib/rpm/redhat/config.sub ./config.sub
`/usr/lib/rpm/redhat/config.sub’ -> `./config.sub’
+ for i in ‘$(find . -name config.guess -o -name config.sub)’
++ basename ./config.guess
+ ‘[‘ -f /usr/lib/rpm/redhat/config.guess ‘]’
+ /bin/rm -f ./config.guess
++ basename ./config.guess
+ /bin/cp -fv /usr/lib/rpm/redhat/config.guess ./config.guess
`/usr/lib/rpm/redhat/config.guess’ -> `./config.guess’
+ ./configure –build=i686-redhat-linux-gnu –host=i686-redhat-linux-gnu –target=i386-redhat-linux-gnu –program-prefix= –prefix=/usr –exec-prefix=/usr –bindir=/usr/bin –sbindir=/usr/sbin –sysconfdir=/etc –datadir=/usr/share –includedir=/usr/include –libdir=/usr/lib –libexecdir=/usr/libexec –localstatedir=/var –sharedstatedir=/usr/com –mandir=/usr/share/man –infodir=/usr/share/info –with-mecab-config=/usr/bin/mecab-config
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking whether make sets $(MAKE)… yes
checking for working aclocal-1.4… found
checking for working autoconf… found
checking for working automake-1.4… found
checking for working autoheader… found
checking for working makeinfo… found
checking for a BSD-compatible install… /usr/bin/install -c
using /usr/bin/mecab-config for mecab-config
configure: creating ./config.status
config.status: creating Makefile
+ /usr/bin/make
/usr/libexec/mecab/mecab-dict-index -d . -o . -f EUC-JP -t euc-jp
reading ./unk.def … 40
emitting double-array: 100% |###########################################|
reading ./Noun.adjv.csv … 3328
reading ./Noun.verbal.csv … 12146
reading ./Suffix.csv … 1393
reading ./Auxil.csv … 199
reading ./Adj.csv … 27210
reading ./Noun.proper.csv … 27327
reading ./Postp-col.csv … 91
reading ./Symbol.csv … 208
reading ./Others.csv … 2
reading ./Adverb.csv … 3032
reading ./Noun.adverbal.csv … 795
reading ./Noun.org.csv … 16668
reading ./Noun.demonst.csv … 120
reading ./Verb.csv … 130750
reading ./Conjunction.csv … 171
reading ./Noun.name.csv … 34202
reading ./Noun.number.csv … 42
reading ./Adnominal.csv … 135
reading ./Filler.csv … 19
reading ./Postp.csv … 146
reading ./Noun.place.csv … 72999
reading ./Noun.others.csv … 151
reading ./Noun.nai.csv … 42
reading ./Interjection.csv … 252
reading ./Prefix.csv … 221
reading ./Noun.csv … 60477
emitting double-array: 100% |###########################################|
reading ./matrix.def … 1316×1316
emitting matrix : 100% |###########################################|
done!
echo To enable dictionary, rewrite /etc/mecabrc as \”dicrc = /usr/lib/mecab/dic/ipadic\”
To enable dictionary, rewrite /etc/mecabrc as “dicrc = /usr/lib/mecab/dic/ipadic”
+ exit 0
実行中(%install): /bin/sh -e /var/tmp/rpm-tmp.95429
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd mecab-ipadic-2.7.0-20070801
+ LANG=C
+ export LANG
+ unset DISPLAY
+ /bin/rm -rf /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root
+ /usr/bin/make install DESTDIR=/var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root
make[1]: Entering directory `/usr/src/redhat/BUILD/mecab-ipadic-2.7.0-20070801′
make[1]: Nothing to be done for `install-exec-am’.
/bin/sh ./mkinstalldirs /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic
mkdir /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root
mkdir /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr
mkdir /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib
mkdir /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab
mkdir /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic
mkdir /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic
/usr/bin/install -c -m 644 ./matrix.bin /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/matrix.bin
/usr/bin/install -c -m 644 ./char.bin /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/char.bin
/usr/bin/install -c -m 644 ./sys.dic /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/sys.dic
/usr/bin/install -c -m 644 ./unk.dic /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/unk.dic
/usr/bin/install -c -m 644 ./left-id.def /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/left-id.def
/usr/bin/install -c -m 644 ./right-id.def /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/right-id.def
/usr/bin/install -c -m 644 ./rewrite.def /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/rewrite.def
/usr/bin/install -c -m 644 ./pos-id.def /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/pos-id.def
/usr/bin/install -c -m 644 ./dicrc /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/dicrc
make[1]: Leaving directory `/usr/src/redhat/BUILD/mecab-ipadic-2.7.0-20070801′
+ /bin/mv /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic-EUCJP
+ /bin/mv -f UTF-8/char.bin UTF-8/char.def UTF-8/dicrc UTF-8/feature.def UTF-8/left-id.def UTF-8/matrix.bin UTF-8/matrix.def UTF-8/pos-id.def UTF-8/rewrite.def UTF-8/right-id.def UTF-8/sys.dic UTF-8/unk.def UTF-8/unk.dic .
+ /usr/bin/make install DESTDIR=/var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root
make[1]: Entering directory `/usr/src/redhat/BUILD/mecab-ipadic-2.7.0-20070801′
make[1]: Nothing to be done for `install-exec-am’.
/bin/sh ./mkinstalldirs /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic
mkdir /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic
/usr/bin/install -c -m 644 ./matrix.bin /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/matrix.bin
/usr/bin/install -c -m 644 ./char.bin /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/char.bin
/usr/bin/install -c -m 644 ./sys.dic /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/sys.dic
/usr/bin/install -c -m 644 ./unk.dic /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/unk.dic
/usr/bin/install -c -m 644 ./left-id.def /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/left-id.def
/usr/bin/install -c -m 644 ./right-id.def /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/right-id.def
/usr/bin/install -c -m 644 ./rewrite.def /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/rewrite.def
/usr/bin/install -c -m 644 ./pos-id.def /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/pos-id.def
/usr/bin/install -c -m 644 ./dicrc /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/lib/mecab/dic/ipadic/dicrc
make[1]: Leaving directory `/usr/src/redhat/BUILD/mecab-ipadic-2.7.0-20070801′
+ /bin/cp -p /usr/src/redhat/SOURCES/terms-and-conditions-for-IFS-J.html LICENSE.jp.html
+ /bin/cp -p /usr/src/redhat/SOURCES/LICENSE.Fedora .
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile
+ /usr/lib/rpm/redhat/brp-java-repack-jars
ファイルの処理中: mecab-ipadic-2.7.0.20070801-1
実行中(%doc): /bin/sh -e /var/tmp/rpm-tmp.13257
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd mecab-ipadic-2.7.0-20070801
+ DOCDIR=/var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/share/doc/mecab-ipadic-2.7.0.20070801
+ export DOCDIR
+ rm -rf /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/share/doc/mecab-ipadic-2.7.0.20070801
+ /bin/mkdir -p /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/share/doc/mecab-ipadic-2.7.0.20070801
+ cp -pr COPYING LICENSE.Fedora LICENSE.jp.html README /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/share/doc/mecab-ipadic-2.7.0.20070801
+ exit 0
Requires(interp): /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /bin/sh
Requires: mecab >= 0.96
ファイルの処理中: mecab-ipadic-EUCJP-2.7.0.20070801-1
実行中(%doc): /bin/sh -e /var/tmp/rpm-tmp.97058
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd mecab-ipadic-2.7.0-20070801
+ DOCDIR=/var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/share/doc/mecab-ipadic-EUCJP-2.7.0.20070801
+ export DOCDIR
+ rm -rf /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/share/doc/mecab-ipadic-EUCJP-2.7.0.20070801
+ /bin/mkdir -p /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/share/doc/mecab-ipadic-EUCJP-2.7.0.20070801
+ cp -pr COPYING LICENSE.Fedora LICENSE.jp.html README /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root/usr/share/doc/mecab-ipadic-EUCJP-2.7.0.20070801
+ exit 0
Requires(interp): /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /bin/sh
Requires: mecab >= 0.96
伸張ファイルの検査中: /usr/lib/rpm/check-files /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root
書き込み完了: /usr/src/redhat/RPMS/i386/mecab-ipadic-2.7.0.20070801-1.i386.rpm
書き込み完了: /usr/src/redhat/RPMS/i386/mecab-ipadic-EUCJP-2.7.0.20070801-1.i386.rpm
実行中(%clean): /bin/sh -e /var/tmp/rpm-tmp.73198
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd mecab-ipadic-2.7.0-20070801
+ /bin/rm -rf /var/tmp/mecab-ipadic-2.7.0.20070801-1-root-root
+ exit 0
[root@localhost SPECS]# cd /usr/src/redhat/RPMS/i386
[root@localhost i386]# rpm -ivh mecab-ipadic-2.7.0-20070801.i386.rpm
エラー: mecab-ipadic-2.7.0-20070801.i386.rpm のオープンに失敗: そのようなファイルやディレクトリはありません
[root@localhost i386]# rpm -ivh mecab-ipadic-
mecab-ipadic-2.7.0.20070801-1.i386.rpm
mecab-ipadic-EUCJP-2.7.0.20070801-1.i386.rpm
[root@localhost i386]# rpm -ivh mecab-ipadic-2.7.0.20070801-1.i386.rpm
準備中… ########################################### [100%]
1:mecab-ipadic ########################################### [100%]
◆いよいよインストール
[root@localhost ~]# cpan
cpan[1]> install Text::MeCab
CPAN: Storable loaded ok (v2.18)
Going to read /root/.cpan/Metadata
Database was generated on Sun, 24 Aug 2008 04:02:47 GMT
Running install for module ‘Text::MeCab’
Running make for D/DM/DMAKI/Text-MeCab-0.20007.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
CPAN: Compress::Zlib loaded ok (v2.012)
Checksum for /root/.cpan/sources/authors/id/D/DM/DMAKI/Text-MeCab-0.20007.tar.gz ok
Scanning cache /root/.cpan/build for sizes
………………………………………………………………….DONE
Text-MeCab-0.20007/
・
・
・
Text-MeCab-0.20007/typemap
CPAN: File::Temp loaded ok (v0.20)
CPAN: YAML loaded ok (v0.66)
CPAN.pm: Going to build D/DM/DMAKI/Text-MeCab-0.20007.tar.gz
Path to mecab config? [/usr/bin/mecab-config]
detected mecab version 0.96
Using compiler flags ‘-DMECAB_MAJOR_VERSION=0 -DMECAB_MINOR_VERSION=96’…
Using linker flags ‘-L/usr/lib -lmecab’…
Text::MeCab needs to know what encoding you built your dictionary with
to properly execute tests.
Encoding of your mecab dictionary? (shift_jis, euc-jp, utf-8) [utf-8]
Using utf-8 as your dictionary encoding
Detected the following mecab information:
version: 0.96
cflags: -DMECAB_MAJOR_VERSION=0 -DMECAB_MINOR_VERSION=96 -I src
libs: -L/usr/lib -lmecab
include: /usr/include
reading /usr/include/mecab.h to find all constants
Checking if your kit is complete…
Looks good
Warning: prerequisite Class::Accessor::Fast 0 not found.
Warning: prerequisite Path::Class 0 not found.
Writing Makefile for Text::MeCab
—- Unsatisfied dependencies detected during —-
—- DMAKI/Text-MeCab-0.20007.tar.gz —-
Path::Class [requires]
Class::Accessor::Fast [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module ‘Path::Class’
Running make for K/KW/KWILLIAMS/Path-Class-0.16.tar.gz
CPAN: LWP::UserAgent loaded ok (v5.814)
CPAN: Time::HiRes loaded ok (v1.9715)
Fetching with LWP:
ftp://ftp.kddilabs.jp/CPAN/authors/id/K/KW/KWILLIAMS/Path-Class-0.16.tar.gz
Checksum for /root/.cpan/sources/authors/id/K/KW/KWILLIAMS/Path-Class-0.16.tar.gz ok
Path-Class-0.16/
Path-Class-0.16/Build.PL
Path-Class-0.16/Changes
Path-Class-0.16/INSTALL
Path-Class-0.16/lib/
Path-Class-0.16/lib/Path/
Path-Class-0.16/lib/Path/Class/
Path-Class-0.16/lib/Path/Class/Dir.pm
Path-Class-0.16/lib/Path/Class/Entity.pm
Path-Class-0.16/lib/Path/Class/File.pm
Path-Class-0.16/lib/Path/Class.pm
Path-Class-0.16/Makefile.PL
Path-Class-0.16/MANIFEST
Path-Class-0.16/META.yml
Path-Class-0.16/README
Path-Class-0.16/SIGNATURE
Path-Class-0.16/t/
Path-Class-0.16/t/01-basic.t
Path-Class-0.16/t/02-foreign.t
Path-Class-0.16/t/03-filesystem.t
CPAN: Module::Build loaded ok (v0.2808)
CPAN.pm: Going to build K/KW/KWILLIAMS/Path-Class-0.16.tar.gz
Checking if your kit is complete…
Looks good
Writing Makefile for Path::Class
cp lib/Path/Class/Entity.pm blib/lib/Path/Class/Entity.pm
cp lib/Path/Class.pm blib/lib/Path/Class.pm
cp lib/Path/Class/File.pm blib/lib/Path/Class/File.pm
cp lib/Path/Class/Dir.pm blib/lib/Path/Class/Dir.pm
Manifying blib/man3/Path::Class.3pm
Manifying blib/man3/Path::Class::Dir.3pm
Manifying blib/man3/Path::Class::File.3pm
KWILLIAMS/Path-Class-0.16.tar.gz
/usr/bin/make — OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl “-MExtUtils::Command::MM” “-e” “test_harness(0, ‘blib/lib’, ‘blib/arch’)” t/*.t
t/01-basic………ok
t/02-foreign…….1/29 # Test 28 got: “dir/subdir” (t/02-foreign.t at line 68 *TODO*)
# Expected: “/dir/subdir”
# t/02-foreign.t line 68 is: ok $dir->as_foreign(‘Unix’), ‘/dir/subdir’;
# Test 29 got: “” (t/02-foreign.t at line 69 *TODO*)
# Expected: “1”
# t/02-foreign.t line 69 is: ok $dir->as_foreign(‘Unix’)->is_absolute, 1;
t/02-foreign…….ok
t/03-filesystem….ok
All tests successful.
Files=3, Tests=158, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.32 cusr 0.06 csys = 0.41 CPU)
Result: PASS
KWILLIAMS/Path-Class-0.16.tar.gz
/usr/bin/make test — OK
Running make install
Prepending /root/.cpan/build/Path-Class-0.16-aFpgOc/blib/arch /root/.cpan/build/Path-Class-0.16-aFpgOc/blib/lib to PERL5LIB for ‘install’
Installing /usr/lib/perl5/site_perl/5.8.8/Path/Class.pm
Installing /usr/lib/perl5/site_perl/5.8.8/Path/Class/File.pm
Installing /usr/lib/perl5/site_perl/5.8.8/Path/Class/Dir.pm
Installing /usr/lib/perl5/site_perl/5.8.8/Path/Class/Entity.pm
Installing /usr/share/man/man3/Path::Class::Dir.3pm
Installing /usr/share/man/man3/Path::Class.3pm
Installing /usr/share/man/man3/Path::Class::File.3pm
Writing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Path/Class/.packlist
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
KWILLIAMS/Path-Class-0.16.tar.gz
/usr/bin/make install — OK
Running install for module ‘Class::Accessor::Fast’
Running make for K/KA/KASEI/Class-Accessor-0.31.tar.gz
Fetching with LWP:
ftp://ftp.kddilabs.jp/CPAN/authors/id/K/KA/KASEI/Class-Accessor-0.31.tar.gz
Fetching with LWP:
ftp://ftp.kddilabs.jp/CPAN/authors/id/K/KA/KASEI/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/K/KA/KASEI/Class-Accessor-0.31.tar.gz ok
Class-Accessor-0.31/
Class-Accessor-0.31/t/
Class-Accessor-0.31/t/croak.t
Class-Accessor-0.31/t/bestpractice.t
Class-Accessor-0.31/t/getset.t
Class-Accessor-0.31/t/aliases.t
Class-Accessor-0.31/t/accessors.t
Class-Accessor-0.31/lib/
Class-Accessor-0.31/lib/Class/
Class-Accessor-0.31/lib/Class/Accessor/
Class-Accessor-0.31/lib/Class/Accessor/Faster.pm
Class-Accessor-0.31/lib/Class/Accessor/Fast.pm
Class-Accessor-0.31/lib/Class/Accessor.pm
Class-Accessor-0.31/README
Class-Accessor-0.31/Changes
Class-Accessor-0.31/Makefile.PL
Class-Accessor-0.31/META.yml
Class-Accessor-0.31/INSTALL
Class-Accessor-0.31/examples/
Class-Accessor-0.31/examples/benchmark
Class-Accessor-0.31/MANIFEST
CPAN.pm: Going to build K/KA/KASEI/Class-Accessor-0.31.tar.gz
Checking if your kit is complete…
Looks good
Writing Makefile for Class::Accessor
cp lib/Class/Accessor/Fast.pm blib/lib/Class/Accessor/Fast.pm
cp lib/Class/Accessor/Faster.pm blib/lib/Class/Accessor/Faster.pm
cp lib/Class/Accessor.pm blib/lib/Class/Accessor.pm
Manifying blib/man3/Class::Accessor::Faster.3pm
Manifying blib/man3/Class::Accessor::Fast.3pm
Manifying blib/man3/Class::Accessor.3pm
KASEI/Class-Accessor-0.31.tar.gz
/usr/bin/make — OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl “-MExtUtils::Command::MM” “-e” “test_harness(0, ‘blib/lib’, ‘blib/arch’)” t/*.t
t/accessors…….ok
t/aliases………ok
t/bestpractice….ok
t/croak………..ok
t/getset……….ok
All tests successful.
Files=5, Tests=119, 0 wallclock secs ( 0.02 usr 0.04 sys + 0.26 cusr 0.02 csys = 0.34 CPU)
Result: PASS
KASEI/Class-Accessor-0.31.tar.gz
/usr/bin/make test — OK
Running make install
Prepending /root/.cpan/build/Class-Accessor-0.31-SJbGyM/blib/arch /root/.cpan/build/Class-Accessor-0.31-SJbGyM/blib/lib to PERL5LIB for ‘install’
Manifying blib/man3/Class::Accessor::Faster.3pm
Manifying blib/man3/Class::Accessor::Fast.3pm
Manifying blib/man3/Class::Accessor.3pm
Installing /usr/lib/perl5/site_perl/5.8.8/Class/Accessor.pm
Installing /usr/lib/perl5/site_perl/5.8.8/Class/Accessor/Fast.pm
Installing /usr/lib/perl5/site_perl/5.8.8/Class/Accessor/Faster.pm
Installing /usr/share/man/man3/Class::Accessor.3pm
Installing /usr/share/man/man3/Class::Accessor::Faster.3pm
Installing /usr/share/man/man3/Class::Accessor::Fast.3pm
Writing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Class/Accessor/.packlist
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
KASEI/Class-Accessor-0.31.tar.gz
/usr/bin/make install — OK
Running make for D/DM/DMAKI/Text-MeCab-0.20007.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Text-MeCab-0.20007-kCDU45
CPAN.pm: Going to build D/DM/DMAKI/Text-MeCab-0.20007.tar.gz
cp lib/Text/MeCab/Dict.pm blib/lib/Text/MeCab/Dict.pm
cp lib/Text/MeCab/Node.pod blib/lib/Text/MeCab/Node.pod
cp lib/Text/MeCab.pm blib/lib/Text/MeCab.pm
cp lib/Text/MeCab.xs blib/lib/Text/MeCab.xs
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap MeCab.xs > MeCab.xsc && mv MeCab.xsc MeCab.c
gcc -c -DMECAB_MAJOR_VERSION=0 -DMECAB_MINOR_VERSION=96 -I src -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERSION=\”0.20007\” -DXS_VERSION=\”0.20007\” -fPIC “-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE” -DTEXT_MECAB_ENCODING='”utf-8″‘ -DTEXT_MECAB_CONFIG='”/usr/bin/mecab-config”‘ MeCab.c
MeCab.xs:7 から include されたファイル中:
text-mecab.h:124:30: 警告: ファイル末尾に改行がありません
gcc -c -DMECAB_MAJOR_VERSION=0 -DMECAB_MINOR_VERSION=96 -I src -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERSION=\”0.20007\” -DXS_VERSION=\”0.20007\” -fPIC “-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE” -DTEXT_MECAB_ENCODING='”utf-8″‘ -DTEXT_MECAB_CONFIG='”/usr/bin/mecab-config”‘ text-mecab-clone.c
text-mecab-clone.c:7 から include されたファイル中:
text-mecab.h:124:30: 警告: ファイル末尾に改行がありません
gcc -c -DMECAB_MAJOR_VERSION=0 -DMECAB_MINOR_VERSION=96 -I src -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERSION=\”0.20007\” -DXS_VERSION=\”0.20007\” -fPIC “-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE” -DTEXT_MECAB_ENCODING='”utf-8″‘ -DTEXT_MECAB_CONFIG='”/usr/bin/mecab-config”‘ text-mecab-node.c
text-mecab-node.c:7 から include されたファイル中:
text-mecab.h:124:30: 警告: ファイル末尾に改行がありません
gcc -c -DMECAB_MAJOR_VERSION=0 -DMECAB_MINOR_VERSION=96 -I src -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERSION=\”0.20007\” -DXS_VERSION=\”0.20007\” -fPIC “-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE” -DTEXT_MECAB_ENCODING='”utf-8″‘ -DTEXT_MECAB_CONFIG='”/usr/bin/mecab-config”‘ text-mecab.c
text-mecab.c:7 から include されたファイル中:
text-mecab.h:124:30: 警告: ファイル末尾に改行がありません
text-mecab.c: In function ‘TextMeCab_new’:
text-mecab.c:35: 警告: unused variable ‘sv’
text-mecab.c:116:30: 警告: ファイル末尾に改行がありません
text-mecab.c: In function ‘TextMeCab_new_from_av’:
text-mecab.c:56: 警告: ‘argv’ may be used uninitialized in this function
Running Mkbootstrap for Text::MeCab ()
chmod 644 MeCab.bs
rm -f blib/arch/auto/Text/MeCab/MeCab.so
LD_RUN_PATH=”/usr/lib” gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector –param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -L/usr/local/lib MeCab.o text-mecab-clone.o text-mecab-node.o text-mecab.o -o blib/arch/auto/Text/MeCab/MeCab.so \
-lmecab \
chmod 755 blib/arch/auto/Text/MeCab/MeCab.so
cp MeCab.bs blib/arch/auto/Text/MeCab/MeCab.bs
chmod 644 blib/arch/auto/Text/MeCab/MeCab.bs
Manifying blib/man3/Text::MeCab::Dict.3pm
Manifying blib/man3/Text::MeCab::Node.3pm
Manifying blib/man3/Text::MeCab.3pm
DMAKI/Text-MeCab-0.20007.tar.gz
/usr/bin/make — OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl “-MExtUtils::Command::MM” “-e” “test_harness(0, ‘blib/lib’, ‘blib/arch’)” t/*.t t/*/*.t
t/01-sanity………………ok
t/99-pod-coverage…………skipped: Enable TEST_POD environment variable to test POD
t/99-pod…………………skipped: Enable TEST_POD environment variable to test POD
t/node/01_load……………ok
t/node/02_api…………….ok
t/node/03_clone…………..ok
t/node/04_clone_free………ok
t/node/05_format………….ok
t/regression/01_tomi_args….skipped: SWIG MeCab not available
t/tagger/01_load………….ok
t/tagger/02_api…………..ok
t/tagger/03_basic…………ok
All tests successful.
Files=12, Tests=2466, 4 wallclock secs ( 0.82 usr 0.02 sys + 1.00 cusr 0.16 csys = 2.00 CPU)
Result: PASS
DMAKI/Text-MeCab-0.20007.tar.gz
/usr/bin/make test — OK
Running make install
Prepending /root/.cpan/build/Text-MeCab-0.20007-kCDU45/blib/arch /root/.cpan/build/Text-MeCab-0.20007-kCDU45/blib/lib to PERL5LIB for ‘install’
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Text/MeCab/MeCab.so
Installing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Text/MeCab/MeCab.bs
Installing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Text/MeCab.pm
Installing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Text/MeCab.xs
Installing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Text/MeCab/Node.pod
Installing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Text/MeCab/Dict.pm
Installing /usr/share/man/man3/Text::MeCab::Node.3pm
Installing /usr/share/man/man3/Text::MeCab::Dict.3pm
Installing /usr/share/man/man3/Text::MeCab.3pm
Writing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Text/MeCab/.packlist
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
DMAKI/Text-MeCab-0.20007.tar.gz
/usr/bin/make install — OK
参考文献
- CentOS5 にMySQL+Mecab+SennaをRPMでインストールしたときのメモ – Sleepless geek in Seattle :
CentOS5 にMySQL+Mecab+SennaをRPMでインストールしたときのメモ - yoshifumi1975's diaryMecab、Senna、いずれもCentOS用のRPMパッケージがまだ無いので作成。 MySQLへのSennaのパッチも当てたRPMを作成する。 Mecab のrpm作成&インストール まずspecファイルのために、src.rpmの取得&イ... - SourceForge.net: Files :
MeCab - Browse Files at SourceForge.netMeCab is a fast and customizable Japanese morphological analyzer. MeCab is designed for generic purpose and applied to v... - Daisuke Maki / Text-MeCab-0.20007 – search.cpan.org :
Text-MeCab-0.20007Alternative Interface To libmecab
oldId.2008082502593286