If you're not on Windows you'll need to install MeCab yourself.
MeCab is available through Homebrew and MacPorts.
If trying to use the add-on's syntax generator results in Mecab error: executable not found
you'll need to manually set the path to your MeCab
executable:
- Determine the location of the executable by running
which mecab
in the terminal.
If that command doesn't return a path try looking for a file namedmecab
in/opt/homebrew/bin/
(Homebrew) or/opt/local/bin/
(MacPorts). - Enter the full path including the final
mecab
intoMeCab executable path
in the add-on's preferences (Tools → JRP Add-on Preferences...) and uncheckUse system-wide MeCab executable
.
If you get an error like Mecab error: invalid line: param.cpp(69) [ifs] no such file or directory: /path/to/mecabrc
, run touch /path/to/mecabrc
to
create the file in question, where the path is whatever was reported in the
error message.
Please report any macOS-related issues that aren't mentioned here. Since I don't own any macOS devices I can't test the add-on on macOS myself.
Your distro might have a MeCab package, for example:
If you can't find anything, compile MeCab yourself by following the instructions below.
- A C++ compiler. Ideally g++ which, if it isn't installed already, should be
available in a package called
gcc
,g++
, or similar on most distros. Check if it works by runningg++ --version
. libiconv
. Probably already present as part of glibc.git
, for cloning the repo. You can also skip step 1 below by using the source tarball linked here instead: https://taku910.github.io/mecab/#download
- Clone the repository:
git clone https://github.com/taku910/mecab.git
- cd into the
mecab
directory in the repo. It should contain a file calledconfigure
. - Run this command:
./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-charset=utf-8
For some distros the prefix and directories might be different. - If
configure
finished without errors, runmake
(and ensure it succeeds). - Create a temporary target directory.
- Run
make DESTDIR="<tgt dir>" install
, where<tgt dir>
is the absolute path of the directory you just made. - Copy or move
<tgt dir>/usr/bin/mecab
and<tgt dir>/usr/lib/libmecab.so.2
to a new directory. Create an empty file namedmecabrc
in the same directory. - In the add-on's preferences menu, uncheck Use system-wide MeCab executable
and set MeCab executable path to where you put the
mecab
executable in the previous step.
Alternative to step 5-8 you could also create and install a custom package, in which case you can leave the add-on settings on their default values.