Mecab and Apache - jzohrab/lute GitHub Wiki
This documentation is deprecated/obsolete. Lute v2 has been replaced by Lute v3, a full Python rewrite. Please see the Lute v3 manual which includes notes on installation. If you have Lute v2, you can easily migrate to v3. Thank you!
Lute users who are studying Japanese will need to install MeCab and an appropriate dictionary for parsing Japanese text. If MeCab is not installed or not on your PATH (i.e. the PATH used by Apache!), you will not be able to parse Japanese texts.
You may have installed MAMP on your machine, but if your Apache server can't see it, it still won't work within Lute. Ensure that your Apache server's PATH includes the path to your MeCab installation.
Run the following in terminal to adjust the MAMP Apache server PATH:
printf 'export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"' >> /Applications/MAMP/Library/bin/envvars
Then restart Apache.
The file /Applications/MAMP/Library/bin/envvars is read during Apache startup, setting the PATH to include the /usr/local/bin directory where the mecab exe is found. (Ref: https://stackoverflow.com/questions/40767857/change-path-environment-variable-in-mamp).