Skip to content

Error in macOS(Mojave) #10

@kiooss

Description

@kiooss

Does not work in macOS (Mojave).

╰❯❯❯ php -r "print_r(\MeCab\split('あいうえお'));"
PHP Warning:  MeCab\split(): /BuildRoot/Library/Caches/com.apple.xbs/Sources/MeCab/MeCab-779.24.1/src/tagger.cpp(161) [tokenizer_.open(*param)] /BuildRoot/Library/Caches/com.apple.xbs/Sources/MeCab/MeCab-779.24.1/src/tokenizer.cpp(334) [n.value != 0] cannot find UNK category: DEFAULT in Command line code on line 1

Warning: MeCab\split(): /BuildRoot/Library/Caches/com.apple.xbs/Sources/MeCab/MeCab-779.24.1/src/tagger.cpp(161) [tokenizer_.open(*param)] /BuildRoot/Library/Caches/com.apple.xbs/Sources/MeCab/MeCab-779.24.1/src/tokenizer.cpp(334) [n.value != 0] cannot find UNK category: DEFAULT in Command line code on line 1
╰❯❯❯ php -i | grep mecab
Additional .ini files parsed => /usr/local/etc/php/7.2/conf.d/ext-mecab.ini,
mecab
mecab.default_dicdir => /usr/local/lib/mecab/dic/ipadic => /usr/local/lib/mecab/dic/ipadic
mecab.default_rcfile => /usr/local/etc/mecabrc => /usr/local/etc/mecabrc
mecab.default_userdic => no value => no value

It seems that the binding linked to the macOS default /usr/lib/libmecab.dylib caused this issue.
Is there any solution? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions