めも帖

「めも帖」代わりにダラダラと書いていったり、めもしたりしているだけです。

MeCab extensionをインストールしてみた...が、うまくいかない

PHP5の話じゃないけれど。
MeCabPHPから利用するためにMeCab extensionというのを入れてみた

tar xzf php_mecab-0.2.0.tgz
cd php_mecab-0.2.0
phpize
./configure --with-php-config=/usr/local/bin/php-config --with-mecab=/usr/local/bin/mecab-config
make
make install

で、どうしたらいいのかな。phpinfoで見てみても認識されていない。Apacheを再起動したけれどだめ。なんだろう..

make後の表示

/bin/sh /usr/local/src/php_mecab-0.2.0/libtool --mode=install cp ./mecab.la /usr/local/src/php_mecab-0.2.0/modules
cp ./.libs/mecab.so /usr/local/src/php_mecab-0.2.0/modules/mecab.so
cp ./.libs/mecab.lai /usr/local/src/php_mecab-0.2.0/modules/mecab.la
PATH="$PATH:/sbin" ldconfig -n /usr/local/src/php_mecab-0.2.0/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/src/php_mecab-0.2.0/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

明日、もう一回挑戦してみようかなあ