研究日誌(study diary)

2015年10月の記事一覧

mecab error

MeCab: Yet Another Part-of-Speech and Morphological Analyzer



mecab -O asm9d2s.txt

writer.cpp(63) [!tmp.empty()] unkown format type [asm9d2s.txt]

MeCab 分かち書き


mecab -O wakati asm9d2s.txt > asm9d2swakati.txt

input-buffer overflow. The line is split. use -b #SIZE option.

input-buffer overflow. The line is split. use -b #SIZE option.



文字コード 形態素解析 『MeCab』 をインストールしてみる。

MeCab単体での動作確認を

Mac OSX 10.8.3 に MeCab をインストールしたメモ

mecab sample.txt | cut -f1 | sort | uniq -c | sort -nr
http://moguranosenshi.hatenablog.com/entry/2014/02/28/%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%A7%E5%8D%98%E8%AA%9E%E3%82%AB%E3%82%A6%E3%83%B3%E3%83%88

エラー例
cut: stdin: Illegal byte sequence

エディタでUTF-8に保存し直し。(今回はshift-jisだった)


作業例。
MS WORDの場合。

全部をコピーし、エディタでペーストする。
文字コード変換がうまくいかずに保存できない場合には次の方法を取る。

Excelに貼り付け、Excelでtxtファイルとして保存する。
Excelで読み込み、区切り文字を空白で読む。

保存できない文字があるという警告は、後ほど調べるとして、保存する。
空白文字の数は、数だけで文字は映らない。

場合によってはEOS, 空白文字を集計することがある。
集計後除外。
0

install mecab ipadic

 ./configure

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... missing

checking for working autoconf... missing

checking for working automake-1.4... missing

checking for working autoheader... missing

checking for working makeinfo... found

checking for a BSD-compatible install... /usr/bin/install -c

checking for mecab-config... /usr/local/bin/mecab-config

configure: creating ./config.status

config.status: creating Makefile

ken010M:mecab-ipadic-2.7.0-20070801 administrator$ make

/usr/local/libexec/mecab/mecab-dict-index -d . -o . -f EUC-JP -t euc-jp

reading ./unk.def ... 40

emitting double-array: 100% |###########################################| 

./model.def is not found. skipped.

reading ./Adj.csv ... 27210

reading ./Adnominal.csv ... 135

reading ./Adverb.csv ... 3032

reading ./Auxil.csv ... 199

reading ./Conjunction.csv ... 171

reading ./Filler.csv ... 19

reading ./Interjection.csv ... 252

reading ./Noun.adjv.csv ... 3328

reading ./Noun.adverbal.csv ... 795

reading ./Noun.csv ... 60477

reading ./Noun.demonst.csv ... 120

reading ./Noun.nai.csv ... 42

reading ./Noun.name.csv ... 34202

reading ./Noun.number.csv ... 42

reading ./Noun.org.csv ... 16668

reading ./Noun.others.csv ... 151

reading ./Noun.place.csv ... 72999

reading ./Noun.proper.csv ... 27327

reading ./Noun.verbal.csv ... 12146

reading ./Others.csv ... 2

reading ./Postp-col.csv ... 91

reading ./Postp.csv ... 146

reading ./Prefix.csv ... 221

reading ./Suffix.csv ... 1393

reading ./Symbol.csv ... 208

reading ./Verb.csv ... 130750

emitting double-array: 100% |###########################################| 

reading ./matrix.def ... 1316x1316

emitting matrix      : 100% |###########################################| 


done!

echo To enable dictionary, rewrite /usr/local/etc/mecabrc as \"dicrc = /usr/local/lib/mecab/dic/ipadic\"

To enable dictionary, rewrite /usr/local/etc/mecabrc as "dicrc = /usr/local/lib/mecab/dic/ipadic"

ken010M:mecab-ipadic-2.7.0-20070801 administrator$ su

Password:

sh-3.2# make install

make[1]: Nothing to be done for `install-exec-am'.

/bin/sh ./mkinstalldirs /usr/local/lib/mecab/dic/ipadic

mkdir /usr/local/lib/mecab

mkdir /usr/local/lib/mecab/dic

mkdir /usr/local/lib/mecab/dic/ipadic

 /usr/bin/install -c -m 644 ./matrix.bin /usr/local/lib/mecab/dic/ipadic/matrix.bin

 /usr/bin/install -c -m 644 ./char.bin /usr/local/lib/mecab/dic/ipadic/char.bin

 /usr/bin/install -c -m 644 ./sys.dic /usr/local/lib/mecab/dic/ipadic/sys.dic

 /usr/bin/install -c -m 644 ./unk.dic /usr/local/lib/mecab/dic/ipadic/unk.dic

 /usr/bin/install -c -m 644 ./left-id.def /usr/local/lib/mecab/dic/ipadic/left-id.def

 /usr/bin/install -c -m 644 ./right-id.def /usr/local/lib/mecab/dic/ipadic/right-id.def

 /usr/bin/install -c -m 644 ./rewrite.def /usr/local/lib/mecab/dic/ipadic/rewrite.def

 /usr/bin/install -c -m 644 ./pos-id.def /usr/local/lib/mecab/dic/ipadic/pos-id.def

 /usr/bin/install -c -m 644 ./dicrc /usr/local/lib/mecab/dic/ipadic/dicrc

0

mecab install

 ./configure

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... ./install-sh -c -d

checking for gawk... no

checking for mawk... no

checking for nawk... no

checking for awk... awk

checking whether make sets $(MAKE)... yes

checking for gcc... gcc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables... 

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking for style of include used by make... GNU

checking dependency style of gcc... none

checking for g++... g++

checking whether we are using the GNU C++ compiler... yes

checking whether g++ accepts -g... yes

checking dependency style of g++... none

checking how to run the C preprocessor... gcc -E

checking for grep that handles long lines and -e... /usr/bin/grep

checking for egrep... /usr/bin/grep -E

checking whether gcc needs -traditional... no

checking whether make sets $(MAKE)... (cached) yes

checking build system type... x86_64-apple-darwin13.4.0

checking host system type... x86_64-apple-darwin13.4.0

checking how to print strings... printf

checking for a sed that does not truncate output... /usr/bin/sed

checking for fgrep... /usr/bin/grep -F

checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld

checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no

checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm

checking the name lister (/usr/bin/nm) interface... BSD nm

checking whether ln -s works... yes

checking the maximum length of command line arguments... 196608

checking whether the shell understands some XSI constructs... yes

checking whether the shell understands "+="... yes

checking how to convert x86_64-apple-darwin13.4.0 file names to x86_64-apple-darwin13.4.0 format... func_convert_file_noop

checking how to convert x86_64-apple-darwin13.4.0 file names to toolchain format... func_convert_file_noop

checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r

checking for objdump... objdump

checking how to recognize dependent libraries... pass_all

checking for dlltool... dlltool

checking how to associate runtime and link libraries... printf %s\n

checking for ar... ar

checking for archiver @FILE support... no

checking for strip... strip

checking for ranlib... ranlib

checking command to parse /usr/bin/nm output from gcc object... ok

checking for sysroot... no

checking for mt... no

checking if : is a manifest tool... no

checking for dsymutil... dsymutil

checking for nmedit... nmedit

checking for lipo... lipo

checking for otool... otool

checking for otool64... no

checking for -single_module linker flag... yes

checking for -exported_symbols_list linker flag... yes

checking for -force_load linker flag... yes

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 for dlfcn.h... yes

checking for objdir... .libs

checking if gcc supports -fno-rtti -fno-exceptions... yes

checking for gcc option to produce PIC... -fno-common -DPIC

checking if gcc PIC flag -fno-common -DPIC works... yes

checking if gcc static flag -static works... no

checking if gcc supports -c -o file.o... yes

checking if gcc supports -c -o file.o... (cached) yes

checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes

checking dynamic linker characteristics... darwin13.4.0 dyld

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... yes

checking how to run the C++ preprocessor... g++ -E

checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld

checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no

checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes

checking for g++ option to produce PIC... -fno-common -DPIC

checking if g++ PIC flag -fno-common -DPIC works... yes

checking if g++ static flag -static works... no

checking if g++ supports -c -o file.o... yes

checking if g++ supports -c -o file.o... (cached) yes

checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes

checking dynamic linker characteristics... darwin13.4.0 dyld

checking how to hardcode library paths into programs... immediate

checking for library containing strerror... none required

checking whether byte ordering is bigendian... no

checking for ld used by GCC... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld

checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no

checking for shared library run path origin... done

checking for iconv... yes

checking for working iconv... yes

checking how to link with libiconv... -liconv

checking for iconv declaration... 

         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);

checking for ANSI C header files... (cached) yes

checking for an ANSI C-conforming const... yes

checking whether byte ordering is bigendian... (cached) no

checking for string.h... (cached) yes

checking for stdlib.h... (cached) yes

checking for unistd.h... (cached) yes

checking fcntl.h usability... yes

checking fcntl.h presence... yes

checking for fcntl.h... yes

checking for stdint.h... (cached) yes

checking for sys/stat.h... (cached) yes

checking sys/mman.h usability... yes

checking sys/mman.h presence... yes

checking for sys/mman.h... yes

checking sys/times.h usability... yes

checking sys/times.h presence... yes

checking for sys/times.h... yes

checking for sys/types.h... (cached) yes

checking dirent.h usability... yes

checking dirent.h presence... yes

checking for dirent.h... yes

checking ctype.h usability... yes

checking ctype.h presence... yes

checking for ctype.h... yes

checking for sys/types.h... (cached) yes

checking io.h usability... no

checking io.h presence... no

checking for io.h... no

checking windows.h usability... no

checking windows.h presence... no

checking for windows.h... no

checking pthread.h usability... yes

checking pthread.h presence... yes

checking for pthread.h... yes

checking for off_t... yes

checking for size_t... yes

checking size of char... 1

checking size of short... 2

checking size of int... 4

checking size of long... 8

checking size of long long... 8

checking size of size_t... 8

checking for size_t... (cached) yes

checking for unsigned long long int... yes

checking for stdlib.h... (cached) yes

checking for unistd.h... (cached) yes

checking for sys/param.h... yes

checking for getpagesize... yes

checking for working mmap... yes

checking for main in -lstdc++... yes

checking for pthread_create in -lpthread... yes

checking for pthread_join in -lpthread... yes

checking for getenv... yes

checking for opendir... yes

checking whether make is GNU Make... yes

checking if g++ supports stl <vector> (required)... yes

checking if g++ supports stl <list> (required)... yes

checking if g++ supports stl <map> (required)... yes

checking if g++ supports stl <set> (required)... yes

checking if g++ supports stl <queue> (required)... yes

checking if g++ supports stl <functional> (required)... yes

checking if g++ supports stl <algorithm> (required)... yes

checking if g++ supports stl <string> (required)... yes

checking if g++ supports stl <iostream> (required)... yes

checking if g++ supports stl <sstream> (required)... yes

checking if g++ supports stl <fstream> (required)... yes

checking if g++ supports template <class T> (required)... yes

checking if g++ supports const_cast<> (required)... yes

checking if g++ supports static_cast<> (required)... yes

checking if g++ supports reinterpret_cast<> (required)... yes

checking if g++ supports namespaces (required) ... yes

checking if g++ supports __thread (optional)... yes

checking if g++ supports template <class T> (required)... yes

checking if g++ supports GCC native atomic operations (optional)... yes

checking if g++ supports OSX native atomic operations (optional)... yes

checking if g++ environment provides all required features... yes

configure: creating ./config.status

config.status: creating Makefile

config.status: creating src/Makefile

config.status: creating src/Makefile.msvc

config.status: creating man/Makefile

config.status: creating doc/Makefile

config.status: creating tests/Makefile

config.status: creating swig/version.h

config.status: creating mecab.iss

config.status: creating mecab-config

config.status: creating mecabrc

config.status: creating config.h

config.status: executing depfiles commands

config.status: executing libtool commands

config.status: executing default commands

ken010M:mecab-0.996 administrator$ make

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive

Making all in src

/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102   -DMECAB_DEFAULT_RC="\"/usr/local/etc/mecabrc\""    -O3 -Wall  -c -o viterbi.lo viterbi.cpp

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c viterbi.cpp  -fno-common -DPIC -o .libs/viterbi.o

In file included from viterbi.cpp:11:

./connector.h:56:17: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

    return (lid >= 0 && lid < rsize_ && rid >= 0 && rid < lsize_);

            ~~~ ^  ~

./connector.h:56:45: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

    return (lid >= 0 && lid < rsize_ && rid >= 0 && rid < lsize_);

                                        ~~~ ^  ~

In file included from viterbi.cpp:14:

./param.h:30:13: warning: unused function 'lexical_cast' [-Wunused-function]

std::string lexical_cast<std::string, std::string>(std::string arg) {

            ^

3 warnings generated.

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c viterbi.cpp -o viterbi.o >/dev/null 2>&1

/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102   -DMECAB_DEFAULT_RC="\"/usr/local/etc/mecabrc\""    -O3 -Wall  -c -o tagger.lo tagger.cpp

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c tagger.cpp  -fno-common -DPIC -o .libs/tagger.o

In file included from tagger.cpp:10:

./connector.h:56:17: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

    return (lid >= 0 && lid < rsize_ && rid >= 0 && rid < lsize_);

            ~~~ ^  ~

./connector.h:56:45: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

    return (lid >= 0 && lid < rsize_ && rid >= 0 && rid < lsize_);

                                        ~~~ ^  ~

2 warnings generated.


中略

DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c tokenizer.cpp  -fno-common -DPIC -o .libs/tokenizer.o

In file included from tokenizer.cpp:7:

./connector.h:56:17: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

    return (lid >= 0 && lid < rsize_ && rid >= 0 && rid < lsize_);

            ~~~ ^  ~

./connector.h:56:45: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

    return (lid >= 0 && lid < rsize_ && rid >= 0 && rid < lsize_);

                                        ~~~ ^  ~

2 warnings generated.


中略

fno-common -DPIC -o .libs/dictionary.o

In file included from dictionary.cpp:8:

./connector.h:56:17: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

    return (lid >= 0 && lid < rsize_ && rid >= 0 && rid < lsize_);

            ~~~ ^  ~

./connector.h:56:45: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

    return (lid >= 0 && lid < rsize_ && rid >= 0 && rid < lsize_);

                                        ~~~ ^  ~

In file included from dictionary.cpp:9:

./context_id.h:45:17: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

    return (lid >= 0 && lid < left_size() &&

            ~~~ ^  ~

./context_id.h:46:17: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]

            rid >= 0 && rid < right_size());

            ~~~ ^  ~

4 warnings generated.


中略

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c lbfgs.cpp  -fno-common -DPIC -o .libs/lbfgs.o

lbfgs.cpp:37:18: warning: unused variable 'lb3_1_mp' [-Wunused-const-variable]

static const int lb3_1_mp = 6;

                 ^

lbfgs.cpp:38:18: warning: unused variable 'lb3_1_lp' [-Wunused-const-variable]

static const int lb3_1_lp = 6;

                 ^

In file included from lbfgs.cpp:27:

./lbfgs.h:55:37: warning: private field 'maxfev' is not used [-Wunused-private-field]

  int iter, info, ispt, isyt, iypt, maxfev;

                                    ^

3 warnings generated.

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c lbfgs.cpp -o lbfgs.o >/dev/null 2>&1

/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102   -DMECAB_DEFAULT_RC="\"/usr/local/etc/mecabrc\""    -O3 -Wall  -c -o learner_tagger.lo learner_tagger.cpp

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c learner_tagger.cpp  -fno-common -DPIC -o .libs/learner_tagger.o

learner_tagger.cpp:25:7: warning: unused function 'mystrdup' [-Wunused-function]

char *mystrdup(const std::string &str) {

      ^

1 warning generated.

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c learner_tagger.cpp -o learner_tagger.o >/dev/null 2>&1

/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102   -DMECAB_DEFAULT_RC="\"/usr/local/etc/mecabrc\""    -O3 -Wall  -c -o learner.lo learner.cpp

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c learner.cpp  -fno-common -DPIC -o .libs/learner.o

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c learner.cpp -o learner.o >/dev/null 2>&1

/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102   -DMECAB_DEFAULT_RC="\"/usr/local/etc/mecabrc\""    -O3 -Wall  -c -o libmecab.lo libmecab.cpp

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DDIC_VERSION=102 -DMECAB_DEFAULT_RC=\"/usr/local/etc/mecabrc\" -O3 -Wall -c libmecab.cpp  -fno-common -DPIC -o .libs/libmecab.o

libmecab.cpp:19:12: warning: unused variable 'kUnknownError' [-Wunused-const-variable]

const char kUnknownError[] = "Unknown Error";

           ^

1 warning generated.


中略

/bin/sh ../libtool --tag=CXX   --mode=link g++  -O3 -Wall    -o mecab-test-gen mecab-test-gen.o libmecab.la -lpthread -lpthread  -lstdc++ -liconv

libtool: link: g++ -O3 -Wall -o .libs/mecab-test-gen mecab-test-gen.o -Wl,-bind_at_load  ./.libs/libmecab.dylib -lpthread -lstdc++ -liconv

Making all in man

make[2]: Nothing to be done for `all'.

Making all in doc

make[2]: Nothing to be done for `all'.

Making all in tests

make[2]: Nothing to be done for `all'.

make[2]: Nothing to be done for `all-am'.

ken010M:mecab-0.996 administrator$  su

Password:

sh-3.2# make install

Making install in src

test -z "/usr/local/lib" || .././install-sh -c -d "/usr/local/lib"

 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libmecab.la '/usr/local/lib'

libtool: install: /usr/bin/install -c .libs/libmecab.2.dylib /usr/local/lib/libmecab.2.dylib

libtool: install: (cd /usr/local/lib && { ln -s -f libmecab.2.dylib libmecab.dylib || { rm -f libmecab.dylib && ln -s libmecab.2.dylib libmecab.dylib; }; })

libtool: install: /usr/bin/install -c .libs/libmecab.lai /usr/local/lib/libmecab.la

libtool: install: /usr/bin/install -c .libs/libmecab.a /usr/local/lib/libmecab.a

libtool: install: chmod 644 /usr/local/lib/libmecab.a

libtool: install: ranlib /usr/local/lib/libmecab.a

test -z "/usr/local/bin" || .././install-sh -c -d "/usr/local/bin"

  /bin/sh ../libtool   --mode=install /usr/bin/install -c mecab '/usr/local/bin'

libtool: install: /usr/bin/install -c .libs/mecab /usr/local/bin/mecab

test -z "/usr/local/libexec/mecab" || .././install-sh -c -d "/usr/local/libexec/mecab"

  /bin/sh ../libtool   --mode=install /usr/bin/install -c mecab-dict-index mecab-dict-gen mecab-cost-train mecab-system-eval mecab-test-gen '/usr/local/libexec/mecab'

libtool: install: /usr/bin/install -c .libs/mecab-dict-index /usr/local/libexec/mecab/mecab-dict-index

libtool: install: /usr/bin/install -c .libs/mecab-dict-gen /usr/local/libexec/mecab/mecab-dict-gen

libtool: install: /usr/bin/install -c .libs/mecab-cost-train /usr/local/libexec/mecab/mecab-cost-train

libtool: install: /usr/bin/install -c .libs/mecab-system-eval /usr/local/libexec/mecab/mecab-system-eval

libtool: install: /usr/bin/install -c .libs/mecab-test-gen /usr/local/libexec/mecab/mecab-test-gen

test -z "/usr/local/include" || .././install-sh -c -d "/usr/local/include"

 /usr/bin/install -c -m 644 mecab.h '/usr/local/include'

Making install in man

make[2]: Nothing to be done for `install-exec-am'.

test -z "/usr/local/share/man/man1" || .././install-sh -c -d "/usr/local/share/man/man1"

 /usr/bin/install -c -m 644 mecab.1 '/usr/local/share/man/man1'

Making install in doc

make[2]: Nothing to be done for `install-exec-am'.

make[2]: Nothing to be done for `install-data-am'.

Making install in tests

make[2]: Nothing to be done for `install-exec-am'.

make[2]: Nothing to be done for `install-data-am'.

test -z "/usr/local/bin" || ./install-sh -c -d "/usr/local/bin"

 /usr/bin/install -c mecab-config '/usr/local/bin'

test -z "/usr/local/etc" || ./install-sh -c -d "/usr/local/etc"

 /usr/bin/install -c -m 644 mecabrc '/usr/local/etc'



0

brew install iconv

 brew update



Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.





Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.



Error: Failure while executing: git checkout -q master

ken010M:~ administrator$ sudo brew update

Password:


You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements.



You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.


Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'


IMPORTANT: BY USING THIS SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE FOLLOWING APPLE TERMS:


A. MAC SDK AND XCODE AGREEMENT

B. iOS SDK AGREEMENT


APPLE INC.

MAC SDK AND XCODE AGREEMENT


By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree 


You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf


Checking out files: 100% (3855/3855), done.

Updated Homebrew from f6c97474 to c09b6b0c.

==> New Formulae

aap      commonmark    flatbuffers  gst-validatelfe

abduco      consul    flow  gstreamermmlibagar


中略

openwsman      ratfor    sourcekitten  tvnamerzorba

osquery      rbenv-bundle-exec    sparse  ucommonzurl

==> Updated Formulae

a2ps      apparix    aws-elasticache  boost-bcpcdargs

a52dec      appscale-tools    aws-elasticbeanstalk  boost-buildcdb


中略

yacas      yazpp    zbackup  zpython

yaf      yconalyzer    zbar  zsh

==> Deleted Formulae

adobe-air-sdk dwm  gle   libcppa    pixie     texwrapper

afuse dzen2  gnumeric   libdlna    plt-racket     tiger-vnc


brew install iconv

Error: No available formula for iconv 

==> Searching formulae...

==> Searching taps...

homebrew/dupes/libiconv

ken010M:~ administrator$ brew install libiconv

Error: No available formula for libiconv 

==> Searching formulae...

==> Searching taps...

homebrew/dupes/libiconv

ken010M:~ administrator$ brew install homebrew/dupes/libiconv

==> Tapping homebrew/dupes

Cloning into '/usr/local/Library/Taps/homebrew/homebrew-dupes'...

remote: Counting objects: 41, done.

remote: Compressing objects: 100% (41/41), done.

remote: Total 41 (delta 0), reused 3 (delta 0), pack-reused 0

Unpacking objects: 100% (41/41), done.

Checking connectivity... done.

Tapped 38 formulae (101 files, 412K)

==> Installing libiconv from homebrew/homebrew-dupes

==> Downloading http://ftpmirror.gnu.org/libiconv/libiconv-1.14.tar.gz

==> Downloading from http://mirror.jre655.com/GNU/libiconv/libiconv-1.14.tar.gz

######################################################################## 100.0%

==> Downloading https://trac.macports.org/export/89276/trunk/dports/textproc/libiconv/files/patch-Makefile.devel

######################################################################## 100.0%

==> Downloading https://trac.macports.org/export/89276/trunk/dports/textproc/libiconv/files/patch-utf8mac.diff

######################################################################## 100.0%

==> Patching

patching file Makefile.devel

Hunk #1 succeeded at 106 (offset 1 line).

patching file lib/converters.h

patching file lib/encodings.def

patching file lib/utf8mac.h

patching file lib/flags.h

==> ./configure --prefix=/usr/local/Cellar/libiconv/1.14 --enable-extra-encodings

==> make -f Makefile.devel CFLAGS= CC=clang

==> make install

==> Caveats

This formula is keg-only, which means it was not symlinked into /usr/local.


OS X already provides this software and installing another version in

parallel can cause all kinds of trouble.


Generally there are no consequences of this for you. If you build your

own software and it requires this formula, you'll need to add to your

build variables:


    LDFLAGS:  -L/usr/local/opt/libiconv/lib

    CPPFLAGS: -I/usr/local/opt/libiconv/include


==> Summary

  /usr/local/Cellar/libiconv/1.14: 26 files, 1.4M, built in 95 seconds

ken010M:~ administrator$ 



0

brew error

brew install iconv

Error: No available formula for iconv 

==> Searching formulae...

homebrew/dupes/libiconv

==> Searching taps...

==> You haven't updated Homebrew in a while.

A formula for iconv might have been added recently.

Run `brew update` to get the latest Homebrew updates!

ken005M:dev administrator$ brew update

Stashing your changes:

 M Library/.rubocop.yml

 M Library/Aliases/actor-framework

 D Library/Aliases/gperftools



中略


??
 Library/Homebrew/utils/fork.rb

?? Library/Homebrew/utils/git.rb

error: unable to unlink old 'share/man/man1/brew.1' (Permission denied)

fatal: Could not reset index file to revision 'HEAD'.

error: Your local changes to the following files would be overwritten by merge:

share/man/man1/brew.1

Please, commit your changes or stash them before you can merge.

Aborting

Error: Failure while executing: git pull --ff --no-rebase --quiet origin refs/heads/master:refs/remotes/origin/master

ken005M:dev administrator$ sudo brew update

Password:

error: Your local changes to the following files would be overwritten by merge:

share/man/man1/brew.1

Please, commit your changes or stash them before you can merge.

Aborting

Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

ken005M:dev administrator$ brew doctor

Please note that these warnings are just used to help the Homebrew maintainers

with debugging if you file an issue. If everything you use Homebrew for is

working fine: please don't worry and just ignore them. Thanks!


Warning: /usr/local/bin isn't writable.


This can happen if you "sudo make install" software that isn't managed by

by Homebrew. If a formula tries to write a file to this directory, the

install will fail during the link step.


You should probably `chown` /usr/local/bin


Warning: /usr/local/share isn't writable.


This can happen if you "sudo make install" software that isn't managed by

by Homebrew. If a formula tries to write a file to this directory, the

install will fail during the link step.


You should probably `chown` /usr/local/share


Warning: Some directories in /usr/local/share/man aren't writable.

This can happen if you "sudo make install" software that isn't managed

by Homebrew. If a brew tries to add locale information to one of these

directories, then the install will fail during the link step.

You should probably `chown` them:


    /usr/local/share/man

    /usr/local/share/man/de

    /usr/local/share/man/de/man1

    /usr/local/share/man/man1


Warning: The /usr/local directory is not writable.

Even if this directory was writable when you installed Homebrew, other

software may change permissions on this directory. Some versions of the

"InstantOn" component of Airfoil are known to do this.


You should probably change the ownership and permissions of /usr/local

back to your user account.


Warning: Unbrewed dylibs were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when

building Homebrew formulae, and may need to be deleted.


Unexpected dylibs:

    /usr/local/lib/BugpointPasses.dylib

    /usr/local/lib/libLTO.dylib

    /usr/local/lib/LLVMHello.dylib


Warning: Unbrewed header files were found in /usr/local/include.

If you didn't put them there on purpose they could cause problems when

building Homebrew formulae, and may need to be deleted.


Unexpected header files:

    /usr/local/include/llvm/ADT/APFloat.h

    /usr/local/include/llvm/ADT/APInt.h

    /usr/local/include/llvm/ADT/APSInt.h

中略

    /usr/local/include/llvm-c/Transforms/PassManagerBuilder.h

    /usr/local/include/llvm-c/Transforms/Scalar.h

    /usr/local/include/llvm-c/Transforms/Vectorize.h


Warning: Unbrewed static libraries were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when

building Homebrew formulae, and may need to be deleted.


Unexpected static libraries:

    /usr/local/lib/libllvm.a

    /usr/local/lib/libllvm_AArch64.a

    /usr/local/lib/libllvm_all_backends.a

    /usr/local/lib/libllvm_analysis.a

    /usr/local/lib/libllvm_ARM.a


中略

    /usr/local/lib/libLLVMXCoreInfo.a

    /usr/local/lib/libLTO.a


Warning: You have unlinked kegs in your Cellar

Leaving kegs unlinked can lead to build-trouble and cause brews that depend on

those kegs to fail to run properly once built. Run `brew link` on these:


    cloog018

    gcc

    gmp4

    isl011

    libmpc08

    llvm-gcc28

    mpfr2


Warning: /usr/bin occurs before /usr/local/bin

This means that system-provided programs will be used instead of those

provided by Homebrew. The following tools exist at both paths:


    awk

    bashbug

    svn

    svnadmin

    svndumpfilter

    svnlook

    svnserve

    svnsync

    svnversion

    sweep


Consider setting your PATH so that /usr/local/bin

occurs before /usr/bin. Here is a one-liner:

    echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile

ken005M:dev administrator$ 


0