PHP Version 7.1.2 php-mecabエクステンション対応 / PHP 7.0.14 からのアップグレード 

形態素解析MeCab

これまで

 状態:-  閲覧数:1,282  投稿日:2017-03-08  更新日:2017-03-08
PHP Version 7.1.2 エクステンション対応 / PHP 7.0.14 からのアップグレード対応


方針


php-mecab削除後、再インストール
・php.iniファイルの該当部分も一旦削除後、再作成

設定変更反映
・その都度、Apache再起動して確認


手順


1.mecab.ini削除
2.php-mecab削除
3.php-mecabインストール
4.mecab.ini作成

エラーメッセージ / 現状確認

 閲覧数:131 投稿日:2017-03-08 更新日:2017-03-08 

エラーメッセージ


PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mecab.so' - /usr/lib64/php/modules/mecab.so: cannot open shared object file: No such file or directory in Unknown on line 0


現状確認


# mecab -v
mecab of 0.996


# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mecab.so' - /usr/lib64/php/modules/mecab.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 7.1.2 (cli) (built: Feb 15 2017 08:51:17) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies


# less /etc/php.d/mecab.ini
extension=mecab.so




1.mecab.ini削除 / 2.php-mecab削除

 閲覧数:194 投稿日:2017-03-08 更新日:2017-03-08 

1.mecab.ini削除


mecab.iniファイルを削除すると?
・警告表示は消えるがそれだけ
・削除後再インストールは必須
# rm -f /etc/php.d/mecab.ini
# php -v
                                                                                                                       
PHP 7.1.2 (cli) (built: Feb 15 2017 08:51:17) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies


# service httpd restart

# vi /etc/php.d/mecab.ini
extension=mecab.so


# service httpd restart


2.php-mecab削除


今回は手動でリネーム
・FileZilla 使用

Imagickアンインストールとは異なる
・Imagickと同じようにmake installしてるから、アンインストール必須だろうと予想するも外れ
・アンインストール出来なかったので、手動で削除(今回はディレクトリをリネーム)

3.php-mecabインストール / 4.mecab.ini作成

 閲覧数:298 投稿日:2017-03-08 更新日:2017-03-08 

「php-mecab」ディレクトリを削除(もしくはリネーム)


ディレクトリを削除(もしくはリネーム)せずに実行すると?
・後で「$ sudo make test」する際エラーとなるため、そこから先へ進めなくなる
You may have found a problem in PHP.



3.php-mecabインストール


$ git clone https://github.com/rsky/php-mecab.git
Cloning into 'php-mecab'...
remote: Counting objects: 822, done.                                                                                                                        
remote: Total 822 (delta 0), reused 0 (delta 0), pack-reused 822                                                                                            
Receiving objects: 100% (822/822), 174.55 KiB | 284.00 KiB/s, done.
Resolving deltas: 100% (551/551), done.


$ cd php-mecab/mecab/

$ phpize
                                                                                                                                         
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303


$ ./configure --with-php-config=/usr/bin/php-config --with-mecab=/usr/local/bin/mecab-config  
                                                     
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable MeCab support... yes, shared
checking for mecab-config... /usr/local/bin/mecab-config
checking for MeCab library version... 0.996 (ok)
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking mecab.h usability... yes
checking mecab.h presence... yes
checking for mecab.h... yes
checking for mecab_new2 in -lmecab... yes
checking for PHP version... build for 7.1.2
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands


$ make
                                                                                                                                             
/bin/sh /home/★★/php-mecab/mecab/libtool --mode=compile cc  -I. -I/home/★★/php-mecab/mecab -DPHP_ATOM_INC -I/home/★★/php-mecab/mecab/include -I/home/★★/php-mecab/mecab/main -I/home/★★/php-mecab/mecab -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /home/★★/php-mecab/mecab/mecab7.c -o mecab7.lo 
libtool: compile:  cc -I. -I/home/★★/php-mecab/mecab -DPHP_ATOM_INC -I/home/★★/php-mecab/mecab/include -I/home/★★/php-mecab/mecab/main -I/home/★★/php-mecab/mecab -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /home/★★/php-mecab/mecab/mecab7.c  -fPIC -DPIC -o .libs/mecab7.o
/bin/sh /home/★★/php-mecab/mecab/libtool --mode=link cc -DPHP_ATOM_INC -I/home/★★/php-mecab/mecab/include -I/home/★★/php-mecab/mecab/main -I/home/★★/php-mecab/mecab -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -o mecab.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/★★/php-mecab/mecab/modules  mecab7.lo -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lmecab -lstdc++
libtool: link: cc -shared  .libs/mecab7.o   -L/usr/local/lib /usr/local/lib/libmecab.so -lpthread -lstdc++  -Wl,-rpath -Wl,/usr/local/lib   -Wl,-soname -Wl,mecab.so -o .libs/mecab.so
libtool: link: ( cd ".libs" && rm -f "mecab.la" && ln -s "../mecab.la" "mecab.la" )
/bin/sh /home/★★/php-mecab/mecab/libtool --mode=install cp ./mecab.la /home/★★/php-mecab/mecab/modules
libtool: install: cp ./.libs/mecab.so /home/★★/php-mecab/mecab/modules/mecab.so
libtool: install: cp ./.libs/mecab.lai /home/★★/php-mecab/mecab/modules/mecab.la
libtool: finish: PATH="/home/★★/.rvm/gems/ruby-2.0.0-p247/bin:/home/★★/.rvm/gems/ruby-2.0.0-p247@global/bin:/home/★★/.rvm/rubies/ruby-2.0.0-p247/bin:/usr/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/★★/bin:/home/★★/.nodebrew/current/bin:/home/★★/.rvm/bin:/sbin" ldconfig -n /home/★★/php-mecab/mecab/modules
----------------------------------------------------------------------
Libraries have been installed in:
  /home/★★/php-mecab/mecab/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.
Don't forget to run 'make test'.


$ sudo make test  
                                                                                                                             
Build complete.
Don't forget to run 'make test'.


=====================================================================
PHP         : /usr/bin/php
PHP_SAPI    : cli
PHP_VERSION : 7.1.2
ZEND_VERSION: 3.1.0
PHP_OS      : Linux - Linux ☆☆.ne.jp 2.6.32-642.3.1.el6.x86_64 #1 SMP Tue Jul 12 18:30:56 UTC 2016 x86_64
INI actual  : /home/★★/php-mecab/mecab/tmp-php.ini
More .INIs  :  
CWD         : /home/★★/php-mecab/mecab
Extra dirs  :
VALGRIND    : Not used
=====================================================================
TIME START 2017-03-08 12:31:18
=====================================================================
SKIP MeCab\Node::getAlpha() member function [tests/MeCab_Node__getAlpha.phpt] reason: test is not implemented
SKIP MeCab\Node::getBNext() member function [tests/MeCab_Node__getBNext.phpt] reason: test is not implemented
SKIP MeCab\Node::getBeta() member function [tests/MeCab_Node__getBeta.phpt] reason: test is not implemented
SKIP MeCab\Node::getCharType() member function [tests/MeCab_Node__getCharType.phpt] reason: test is not implemented
SKIP MeCab\Node::getCost() member function [tests/MeCab_Node__getCost.phpt] reason: test is not implemented
SKIP MeCab\Node::getENext() member function [tests/MeCab_Node__getENext.phpt] reason: test is not implemented
SKIP MeCab\Node::getFeature() member function [tests/MeCab_Node__getFeature.phpt] reason: test is not implemented
SKIP MeCab\Node::getId() member function [tests/MeCab_Node__getId.phpt] reason: test is not implemented
SKIP MeCab\Node::getIterator() member function [tests/MeCab_Node__getIterator.phpt] reason: test is not implemented
SKIP MeCab\Node::getLPath() member function [tests/MeCab_Node__getLPath.phpt] reason: test is not implemented
SKIP MeCab\Node::getLcAttr() member function [tests/MeCab_Node__getLcAttr.phpt] reason: test is not implemented
SKIP MeCab\Node::getLength() member function [tests/MeCab_Node__getLength.phpt] reason: test is not implemented
SKIP MeCab\Node::getNext() member function [tests/MeCab_Node__getNext.phpt] reason: test is not implemented
SKIP MeCab\Node::getPosId() member function [tests/MeCab_Node__getPosId.phpt] reason: test is not implemented
SKIP MeCab\Node::getPrev() member function [tests/MeCab_Node__getPrev.phpt] reason: test is not implemented
SKIP MeCab\Node::getProb() member function [tests/MeCab_Node__getProb.phpt] reason: test is not implemented
SKIP MeCab\Node::getRLength() member function [tests/MeCab_Node__getRLength.phpt] reason: test is not implemented
SKIP MeCab\Node::getRPath() member function [tests/MeCab_Node__getRPath.phpt] reason: test is not implemented
SKIP MeCab\Node::getRcAttr() member function [tests/MeCab_Node__getRcAttr.phpt] reason: test is not implemented
SKIP MeCab\Node::getStat() member function [tests/MeCab_Node__getStat.phpt] reason: test is not implemented
SKIP MeCab\Node::getSurface() member function [tests/MeCab_Node__getSurface.phpt] reason: test is not implemented
SKIP MeCab\Node::getWCost() member function [tests/MeCab_Node__getWCost.phpt] reason: test is not implemented
SKIP MeCab\Node::isBest() member function [tests/MeCab_Node__isBest.phpt] reason: test is not implemented
SKIP MeCab\Node::setTraverse() member function [tests/MeCab_Node__setTraverse.phpt] reason: test is not implemented
SKIP MeCab\Node::toArray() member function [tests/MeCab_Node__toArray.phpt] reason: test is not implemented
SKIP MeCab\Node::toString() member function [tests/MeCab_Node__toString.phpt] reason: test is not implemented
SKIP MeCab\Path::getCost() member function [tests/MeCab_Path__getCost.phpt] reason: test is not implemented
SKIP MeCab\Path::getLNext() member function [tests/MeCab_Path__getLNext.phpt] reason: test is not implemented
SKIP MeCab\Path::getLNode() member function [tests/MeCab_Path__getLNode.phpt] reason: test is not implemented
SKIP MeCab\Path::getProb() member function [tests/MeCab_Path__getProb.phpt] reason: test is not implemented
SKIP MeCab\Path::getRNext() member function [tests/MeCab_Path__getRNext.phpt] reason: test is not implemented
SKIP MeCab\Path::getRNode() member function [tests/MeCab_Path__getRNode.phpt] reason: test is not implemented
SKIP MeCab\Tagger::dictionaryInfo() member function [tests/MeCab_Tagger__dictionaryInfo.phpt] reason: test is not implemented
SKIP MeCab\Tagger::formatNode() member function [tests/MeCab_Tagger__formatNode.phpt] reason: test is not implemented
PASS instantiate MeCab\Tagger [tests/MeCab_Tagger__new.phpt]
SKIP MeCab\Tagger::next() member function [tests/MeCab_Tagger__next.phpt] reason: test is not implemented
SKIP MeCab\Tagger::nextNode() member function [tests/MeCab_Tagger__nextNode.phpt] reason: test is not implemented
SKIP MeCab\Tagger::parse() member function [tests/MeCab_Tagger__parse.phpt] reason: test is not implemented
SKIP MeCab\Tagger::parseNBest() member function [tests/MeCab_Tagger__parseNBest.phpt] reason: test is not implemented
SKIP MeCab\Tagger::parseNBestInit() member function [tests/MeCab_Tagger__parseNBestInit.phpt] reason: test is not implemented
SKIP MeCab\Tagger::parseToNode() member function [tests/MeCab_Tagger__parseToNode.phpt] reason: test is not implemented
SKIP MeCab\Tagger::parseToString() member function [tests/MeCab_Tagger__parseToString.phpt] reason: test is not implemented
PASS MeCab\split() member function [tests/MeCab__split.phpt]
PASS MeCab\version() function [tests/MeCab__version.phpt]
SKIP mecab_dictionary_info() function [tests/mecab_dictionary_info.phpt] reason: this feature is not available in PHP 7
SKIP mecab_format_node() function [tests/mecab_format_node.phpt] reason: this feature is not available in PHP 7
SKIP mecab_nbest_init() function [tests/mecab_nbest_init.phpt] reason: this feature is not available in PHP 7
SKIP mecab_nbest_next_tonode() function [tests/mecab_nbest_next_tonode.phpt] reason: this feature is not available in PHP 7
SKIP mecab_nbest_next_tostr() function [tests/mecab_nbest_next_tostr.phpt] reason: this feature is not available in PHP 7
SKIP mecab_nbest_sparse_tostr() function [tests/mecab_nbest_sparse_tostr.phpt] reason: this feature is not available in PHP 7
SKIP mecab_new() function [tests/mecab_new.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_alpha() function [tests/mecab_node_alpha.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_beta() function [tests/mecab_node_beta.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_bnext() function [tests/mecab_node_bnext.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_char_type() function [tests/mecab_node_char_type.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_cost() function [tests/mecab_node_cost.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_enext() function [tests/mecab_node_enext.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_feature() function [tests/mecab_node_feature.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_id() function [tests/mecab_node_id.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_isbest() function [tests/mecab_node_isbest.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_lcattr() function [tests/mecab_node_lcattr.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_length() function [tests/mecab_node_length.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_lpath() function [tests/mecab_node_lpath.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_next() function [tests/mecab_node_next.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_posid() function [tests/mecab_node_posid.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_prev() function [tests/mecab_node_prev.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_prob() function [tests/mecab_node_prob.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_rcattr() function [tests/mecab_node_rcattr.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_rlength() function [tests/mecab_node_rlength.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_rpath() function [tests/mecab_node_rpath.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_stat() function [tests/mecab_node_stat.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_surface() function [tests/mecab_node_surface.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_toarray() function [tests/mecab_node_toarray.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_tostring() function [tests/mecab_node_tostring.phpt] reason: this feature is not available in PHP 7
SKIP mecab_node_wcost() function [tests/mecab_node_wcost.phpt] reason: this feature is not available in PHP 7
SKIP mecab_path_cost() function [tests/mecab_path_cost.phpt] reason: this feature is not available in PHP 7
SKIP mecab_path_lnext() function [tests/mecab_path_lnext.phpt] reason: this feature is not available in PHP 7
SKIP mecab_path_lnode() function [tests/mecab_path_lnode.phpt] reason: this feature is not available in PHP 7
SKIP mecab_path_prob() function [tests/mecab_path_prob.phpt] reason: this feature is not available in PHP 7
SKIP mecab_path_rnext() function [tests/mecab_path_rnext.phpt] reason: this feature is not available in PHP 7
SKIP mecab_path_rnode() function [tests/mecab_path_rnode.phpt] reason: this feature is not available in PHP 7
SKIP mecab_sparse_tonode() function [tests/mecab_sparse_tonode.phpt] reason: this feature is not available in PHP 7
SKIP mecab_sparse_tostr() function [tests/mecab_sparse_tostr.phpt] reason: this feature is not available in PHP 7
SKIP mecab_split() function [tests/mecab_split.phpt] reason: this feature is not available in PHP 7
SKIP mecab_version() function [tests/mecab_version.phpt] reason: this feature is not available in PHP 7
=====================================================================
TIME END 2017-03-08 12:31:19

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   15
---------------------------------------------------------------------

Number of tests :   85                 3
Tests skipped   :   82 ( 96.5%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    3 (  3.5%) (100.0%)
---------------------------------------------------------------------
Time taken      :    1 seconds
=====================================================================

This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it.  You can then email it to qa-reports@lists.php.net later.
Do you want to send this report now? [Yns]:

Please enter your email address.
(Your address will be mangled so that it will not go out on any
mailinglist in plain text):

Posting to http://qa.php.net/buildtest-process.php

Thank you for helping to make PHP better.


$ sudo make install  
                                                                                                               
Installing shared extensions:     /usr/lib64/php/modules/



4.mecab.ini作成


$ sudo vi /etc/php.d/mecab.ini  
extension=imagick.so


$ sudo service httpd restart


mecab.iniファイルだけ削除しても、警告表示が消えるだけ

 閲覧数:137 投稿日:2017-03-08 更新日:2017-03-08 

作業開始 / 失敗


mecab.iniファイルを削除すると?
・警告表示は消えるがそれだけ
・どうやら削除後再インストールは必須みたい
# rm -f /etc/php.d/mecab.ini
# php -v
                                                                                                                       
PHP 7.1.2 (cli) (built: Feb 15 2017 08:51:17) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies


# service httpd restart

# vi /etc/php.d/mecab.ini
extension=mecab.so


# service httpd restart


間違い作業履歴。mecab削除した状態で再コンパイル / MeCab本体に手を加える必要はない。php-mecabと勘違いして作業してしまった

 閲覧数:164 投稿日:2017-03-08 更新日:2017-03-08 

mecab削除


rm -f /etc/php.d/mecab.ini

# ls -la
合計 373132
drwx------    25 ★★ ★★      4096  3月  8 18:24 2017 .
drwxr-xr-x.    4 root       root            4096  4月 27 10:29 2014 ..
-rw-------     1 ★★ ★★     21185  3月  8 18:25 2017 .bash_history
-rw-r--r--     1 ★★ ★★        18  5月 11 03:45 2012 .bash_logout
-rw-r--r--     1 ★★ ★★       775  3月  8 18:24 2017 .bash_profile
drwxrwxr-x     3 ★★ ★★      4096  9月 16 10:42 2014 .cache
drwxrwxr-x     3 ★★ ★★      4096  3月  4 22:03 2017 .composer
drwx------     3 ★★ ★★      4096  9月 16 10:40 2014 .config
-rw-rw-r--     1 ★★ ★★      3407 10月 25 21:01 2014 .dbshell
drwxrwxr-x     3 ★★ ★★      4096  3月 25 22:01 2013 .gem
-rw-------     1 ★★ ★★        88  2月  1 10:00 2017 .lesshst
drwxrwxr-x     3 ★★ ★★      4096  9月 16 10:51 2014 .local
-rw-rw-r--     1 ★★ ★★         0  9月 29 21:30 2014 .mongorc.js
-rw-------     1 ★★ ★★       324  2月  8 11:45 2017 .mylogin.cnf
-rw-------     1 ★★ ★★       851  2月  8 12:41 2017 .mysql_history
drwxrwxr-x     4 ★★ ★★      4096  7月 29 10:57 2016 .node-gyp
drwxrwxr-x     6 ★★ ★★      4096  5月 27 12:13 2016 .nodebrew
drwxrwxr-x  1245 ★★ ★★     40960  1月 21 11:54 2017 .npm
drwxrw----     3 ★★ ★★      4096  3月 25 21:54 2013 .pki
drwxrwxr-x    26 ★★ ★★      4096 10月 20 18:56 2014 .rvm
drwx------     2 ★★ ★★      4096  1月 20 12:28 2017 .ssh
drwxrwxr-x     3 ★★ ★★      4096 10月  2 16:56 2014 .subversion
-rw-rw-r--     1 ★★ ★★      4152  6月  5 15:53 2015 .v8flags.3.14.5.9.★★.json
-rw-rw-r--     1 ★★ ★★      9135  5月 28 20:35 2016 .v8flags.5.0.71.47.★★.json
-rw-------     1 ★★ ★★      6844  3月  8 18:24 2017 .viminfo
-rw-rw-r--     1 ★★ ★★       118  3月 25 21:55 2013 .zprofile
-rw-rw-r--     1 ★★ ★★        59  3月 25 21:55 2013 .zshrc
-rw-r--r--     1 ★★ ★★       592  3月  8 15:42 2017 999.bash_profile
-rw-rw-r--     1 ★★ ★★       677  3月  8 15:22 2017 999.bashrc
-rw-r--r--     1 root       root         3969812  1月 16 05:43 2016 MySQL-shared-compat-5.6.29-1.el6.x86_64.rpm
drwxrwxrwx     2 root       root          126976  3月  8 04:04 2017 backup
-rw-rw-rw-     1 ★★ ★★ 178942935  9月 13 14:44 2016 backupmukaer_blog-20160913.sql.gz
-rw-rw-rw-     1 ★★ ★★     18664  1月 13 13:43 2017 backupsqltest-20170113.sql
-rw-rw-rw-     1 ★★ ★★ 184860121  1月 13 13:31 2017 backupsqltest-20170113.sql.gz
drwxrwxr-x     3 ★★ ★★      4096  9月 16 10:51 2014 bower_configuration
drwxr-xr-x    10 ★★ ★★      4096  1月 16 14:04 2015 casperjs
-rw-rw-r--     1 ★★ ★★     29109  4月 21 14:02 2013 ls.txt
drwxr-xr-x     9 ★★ ★★      4096  3月 11 08:56 2016 mecab-0.996
-rw-rw-r--     1 ★★ ★★   1398663  2月 18 02:27 2013 mecab-0.996.tar.gz
-rw-rw-r--     1 ★★ ★★   1398663  2月 18 02:27 2013 mecab-0.996.tar.gz.1
drwxrwxr-x    13 ★★ ★★      4096  3月 26 23:03 2013 myapp
-rw-rw-r--     1 ★★ ★★     20027  6月 23 10:09 2014 nodebrew
drwxr-xr-x    12 ★★ ★★      4096 12月 19 19:13 2014 phantomjs
drwxr-xr-x     5 ★★ ★★      4096  2月 14 21:39 2016 php-mecab
drwxr-xr-x    10 ★★ ★★      4096  3月 16 11:37 2015 php-mecab-0.5.0
-rw-rw-r--     1 ★★ ★★     50180  3月 16 11:35 2015 php-mecab-0.5.0.tgz
-rw-rw-r--     1 ★★ ★★  10983915  3月  1 05:07 2016 phpMyAdmin-4.5.5.1-all-languages.zip
-rw-r--r--     1 root       root            7615 12月  9 18:15 2015 remi-release-6.rpm
-rw-rw-r--     1 ★★ ★★      7611 12月  9 18:15 2015 remi-release-7.rpm
-rw-rw-r--     1 ★★ ★★      7611 12月  9 18:15 2015 remi-release-7.rpm.1
drwxrwxr-x     3 ★★ ★★      4096  1月 16 16:33 2016 repos
drwxrwxrwx     2 root       root            4096  2月  8 11:50 2017 shell
drwxrwxr-x     2 ★★ ★★      4096  3月  5 10:34 2017 tmp

# cd mecab-0.996
# ls -la
合計 25960
drwxr-xr-x  9 ★★ ★★     4096  3月 11 08:56 2016 .
drwx------ 25 ★★ ★★     4096  3月  8 18:24 2017 ..
-rw-r--r--  1 ★★ ★★       28  9月 30 01:44 2012 AUTHORS
-rw-r--r--  1 ★★ ★★     1602  9月 30 01:44 2012 BSD
-rw-r--r--  1 ★★ ★★      240  9月 30 01:44 2012 COPYING
-rw-r--r--  1 ★★ ★★        0  9月 30 01:44 2012 ChangeLog
-rw-r--r--  1 ★★ ★★    18009  9月 30 01:44 2012 GPL
-rw-r--r--  1 ★★ ★★    11410  9月 30 01:44 2012 INSTALL
-rw-r--r--  1 ★★ ★★    26428  9月 30 01:44 2012 LGPL
-rw-rw-r--  1 ★★ ★★    31264  3月 11 08:56 2016 Makefile
-rw-r--r--  1 ★★ ★★     3267  9月 30 01:44 2012 Makefile.am
-rw-r--r--  1 ★★ ★★    31252  2月 15 17:08 2013 Makefile.in
-rw-r--r--  1 ★★ ★★      995  9月 30 01:44 2012 Makefile.train
-rw-r--r--  1 ★★ ★★        0  9月 30 01:44 2012 NEWS
-rw-r--r--  1 ★★ ★★       19  9月 30 01:44 2012 README
-rw-r--r--  1 ★★ ★★   401494  2月 15 17:07 2013 aclocal.m4
-rwxr-xr-x  1 ★★ ★★    44504  9月 30 01:44 2012 config.guess
-rw-rw-r--  1 ★★ ★★     4442  6月 28 19:02 2014 config.h
-rw-r--r--  1 ★★ ★★     4182  2月 15 17:13 2013 config.h.in
-rw-rw-r--  1 ★★ ★★    54016  3月 11 08:56 2016 config.log
-rwxr-xr-x  1 ★★ ★★    18343  9月 30 01:44 2012 config.rpath
-rwxrwxr-x  1 ★★ ★★    72748  3月 11 08:56 2016 config.status
-rwxr-xr-x  1 ★★ ★★    35206  9月 30 01:44 2012 config.sub
-rwxr-xr-x  1 ★★ ★★   649141  2月 15 17:08 2013 configure
-rw-r--r--  1 ★★ ★★     7242  2月 15 17:07 2013 configure.in
drwxr-xr-x  4 ★★ ★★     4096  3月 11 08:56 2016 doc
drwxr-xr-x  2 ★★ ★★     4096  2月 18 02:24 2013 example
-rwxr-xr-x  1 ★★ ★★    13663  9月 30 01:44 2012 install-sh
-rwxrwxr-x  1 ★★ ★★   299064  3月 11 08:56 2016 libtool
-rw-r--r--  1 ★★ ★★   283680  2月 15 17:07 2013 ltmain.sh
drwxr-xr-x  2 ★★ ★★     4096  3月 11 08:56 2016 man
-rwxrwxr-x  1 ★★ ★★     1651  3月 11 08:56 2016 mecab-config
-rw-r--r--  1 ★★ ★★     1620  9月 30 01:44 2012 mecab-config.in
drwxrwxr-x  2 ★★ ★★     4096  3月 11 08:58 2016 mecab-ipadic-2.7.0-20070801
-rw-rw-r--  1 ★★ ★★ 12208105  8月  1 00:25 2007 mecab-ipadic-2.7.0-20070801.tar.gz
-rw-rw-r--  1 ★★ ★★ 12208105  8月  1 00:25 2007 mecab-ipadic-2.7.0-20070801.tar.gz.1
-rw-rw-r--  1 ★★ ★★     5280  3月 11 08:56 2016 mecab.iss
-rwxr-xr-x  1 ★★ ★★     5292  9月 30 01:44 2012 mecab.iss.in
-rw-rw-r--  1 ★★ ★★      295  3月 11 08:56 2016 mecabrc
-rw-r--r--  1 ★★ ★★      293  9月 30 01:44 2012 mecabrc.in
-rw-r--r--  1 ★★ ★★    11135  9月 30 01:44 2012 missing
-rw-r--r--  1 ★★ ★★     3495  9月 30 01:44 2012 mkinstalldirs
drwxr-xr-x  3 ★★ ★★     4096  3月 11 08:56 2016 src
-rw-rw-r--  1 ★★ ★★       23  3月 11 08:56 2016 stamp-h1
drwxr-xr-x  2 ★★ ★★     4096  3月 11 08:56 2016 swig
drwxr-xr-x 11 ★★ ★★     4096  3月 11 08:56 2016 tests

# make uninstall
Making uninstall in src
make[1]: ディレクトリ `/home/★★/mecab-0.996/src' に入ります
( cd '/usr/local/bin' && rm -f mecab )
( cd '/usr/local/include' && rm -f mecab.h )
/bin/sh ../libtool   --mode=uninstall rm -f '/usr/local/lib/libmecab.la'
libtool: uninstall: rm -f /usr/local/lib/libmecab.la /usr/local/lib/libmecab.so.2.0.0 /usr/local/lib/libmecab.so.2 /usr/local/lib/libmecab.so /usr/local/lib/libmecab.a
( cd '/usr/local/libexec/mecab' && rm -f mecab-dict-index mecab-dict-gen mecab-cost-train mecab-system-eval mecab-test-gen )
make[1]: ディレクトリ `/home/★★/mecab-0.996/src' から出ます
Making uninstall in man
make[1]: ディレクトリ `/home/★★/mecab-0.996/man' に入ります
( cd '/usr/local/share/man/man1' && rm -f mecab.1 )
make[1]: ディレクトリ `/home/★★/mecab-0.996/man' から出ます
Making uninstall in doc
make[1]: ディレクトリ `/home/★★/mecab-0.996/doc' に入ります
make[1]: `uninstall' に対して行うべき事はありません.
make[1]: ディレクトリ `/home/★★/mecab-0.996/doc' から出ます
Making uninstall in tests
make[1]: ディレクトリ `/home/★★/mecab-0.996/tests' に入ります
make[1]: `uninstall' に対して行うべき事はありません.
make[1]: ディレクトリ `/home/★★/mecab-0.996/tests' から出ます
make[1]: ディレクトリ `/home/★★/mecab-0.996' に入ります
( cd '/usr/local/bin' && rm -f mecab-config )
( cd '/usr/local/etc' && rm -f mecabrc )
make[1]: ディレクトリ `/home/★★/mecab-0.996' から出ます

# mecab -v
bash: /usr/local/bin/mecab: そのようなファイルやディレクトリはありません



・ディレクトリを削除(もしくはリネームせずに実行すると)

$ sudo make test
You may have found a problem in PHP.


ハマった点

 閲覧数:128 投稿日:2017-03-08 更新日:2017-03-08 
アンインストール出来なかったため、phpizeから開始
・ところが何回試しても、「$ sudo make test」でエラーが発生
・どうしてもそこから先へ進めない

同じバージョンなので、わざわざ再度取得する必要はないと思っていた
・いやもしかすると再度取得する必要はないのかもしれないが、少なくとも再度解凍する必要はあると思われる

「php-mecab」ディレクトリを削除(今回はリネーム)したら、ようやくインストール出来た


php-mecab 0.6.0 再インストール × PHP7



類似度ページランキング
順位 ページタイトル抜粋
1 PHP Version 7.1.2 Xdebugエクステンション対応 / PHP 7.0.14 からのアップグレード  63
2 PHP Version 7.1.2 エクステンション対応 / PHP 7.0.14 からのアップグレード対応  63
3 PHP Version 7.1.2 Data Structuresエクステンション対応 48
4 PHP Version 7.1.2 インストール / PHP 7.0.14 からのバージョンアップ対応 / CentOS 6 47
5 pipアップグレード 9.0.1 → 10.0.1 /usr/bin/python3.6 CentOS7 39
6 php-mecab 0.6.0 再インストール × PHP7 37
7 申込→公開10.Python 2.7.3 インストール / make install 37
8 phpMyAdmin-4.6.3 インストール / phpMyAdmin4.5.5.1からのアップデート -2- 36
9 pipアップグレード 7.1.0 → 9.0.1 / CentOS6 35
10 MySQL5.7.17インストール / MySQL5.6.34 からのバージョンアップ対応  35
11 uwsgi 2.0.17 インストール /usr/bin/python3.6 CentOS7 35
12 Apache 2.2.15を、2.2系の最新へアップグレードしたいがうまくいかない 35
13 7回目-12.Go1.10インストール /usr/local/go/bin/go CentOS7 35
14 phpMyAdmin-4.6.6 インストール / phpMyAdmin4.6.3からのアップデート 34
15 php-mecab 0.6.0 インストール 33
16 指定IPアドレス以外からのアクセスは、.htaccessでサイト内のメンテナンスページへ誘導 33
17 Python 3.6.4 を CentOS7 へ yumインストール /usr/bin/python3.6 33
18 beautifulsoup4-4.6.0 インストール / pip3 install 33
19 クッキー / Windows7 / Chrome 33
20 Go1.10.1インストール /usr/local/go/bin/go CentOS7 32
2021/9/25 8:22 更新
週間人気ページランキング / 9-18 → 9-24
順位 ページタイトル抜粋 アクセス数
1 Nginx設定。エラーログレベル | Nginx(Webサーバ) 17
2 PHP実行ユーザ設定 / CentOS6 / Apache | PHP(プログラミング言語) 14
3 9回目-13.MySQL5.7.21設定 | CentOS 7 2週間無料のお試し期間 9回目(さくらVPS) 12
4 PHPのmb_send_mail関数でメール送信できない | メール処理システム 10
5 ImageMagick と imagick の違い | ImageMagick(ソフトウェアスイート) 9
6 さくらVPS0 8
6 tar: これは tar アーカイブではないようです 8
7 manページ日本語表示 | CentOS 7 (CentOS) 7
7 Reached target Shutdown メッセージが表示されたあと、シャットダウンまたは再起動プロセスがハングアップする | CentOS 7 (CentOS) 7
8 ABRT により 問題が検出されました | CentOS 7 (CentOS) 6
8 PHPファイルでchmodエラー | PHP(プログラミング言語) 6
8 「設定ファイルに、暗号化 (blowfish_secret) 用の非公開パスフレーズの設定を必要とするようになりました。」対応 6
8 Python 3.5 アンインストール / yum remove | Python(プログラミング言語) 6
9 FFmpeg 2.8.15 を yum インストール | ソフトウェアスイート 5
9 echo と cat の違い 5
10 phpMyAdmin 4.4.3(phpMyAdmin) カテゴリー 4
10 6回目-10.Nginxでバーチャルホスト設定確認 | CentOS 7 2週間無料のお試し期間 6回目(さくらVPS) 4
10 「さくらVPS」で、「CentOS6」を「CentOS7」へ変更するためには? | CentOS 7 2週間無料のお試し期間 Link(さくらVPS) 4
10 cronで定期実行しているphpファイルを、コマンドライン経由で即時実行する | cron(Linuxコマンド) 4
10 MySQL 5.5 から 5.6 へのアップグレード | MySQL(データベース) 4
2021/9/25 1:01 更新