-
Notifications
You must be signed in to change notification settings - Fork 19
OS 'DAR' not found for MeCab #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hmmm, it seems I never tried MeCab with a Mac as I don't own one. I may ask you a small contribution @quopquai 😄 First, did you install MeCab? It is not shipped with LWT and needs to be installed separately. Second, can you open a terminal and tell me if this command works |
Okay, so MeCab is not installed. You need to install it first, and the previous command returns the location of the binary. Unfortunately I cannot recommend you a good tutorial as I don't have a Mac, but I already read that you can install it with homebrew. Once that's done, we can work one an integration of MeCab for Mac! |
Nice! Let's perform some live surgery on LWT! Can you go to line 250 of From if ($os == 'LIN') { to if ($os == 'LIN' || $os == 'DAR') { If MeCab works with that, I'm adding the feature! EDIT: just to explain a bit |
...I changed it...and saved... ![]() lwt is giving me this now: Fatal Error: MeCab not detected! Please install it and add it to your PATH. Backtrace: #0 /Applications/MAMP/htdocs/lwt-2.8.1/inc/kernel_utility.php(254): my_die('MeCab not detec...') |
I think you installed MeCab on your computer, but MAMP cannot access its path and cannot find it. I'm not sure about how to solve it 🤔 I'm looking online... |
By the way, did you do that? |
...no, how do you do that? |
I'm copy/pasting from https://apple.stackexchange.com/questions/41542/adding-a-new-executable-to-the-path-environment-variable In your case, you can add |
I'm sorry for the delay: Macintosh:~ julisco$ usr/local/bin/mecab I have no idea what is going on?! |
I cannot be sure... I think the best solution for now is to try having a working instance of MeCab, then run LWT, and if it doesn't work you may need to configure MAMP to use the good path (I'm really not sure how MAMP works)... |
I found this in my terminal when installing MeCab: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun does it mean anything? |
I have no idea what that is, sorry 😞 |
https://github.com/jzohrab/lute/wiki/Mecab-and-Apache MAMP (Mac users) printf 'export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"' >> /Applications/MAMP/Library/bin/envvars ...finally jz from LUTE gave me the solution. Thanks again HugoFara!!! :) |
Add this in docs and close issue. |
New databse migration strategy. Fixes feeds (#168). Adds missing documentation to Docker (#146, #160). Changes in PHP and JS globals. Fixes reading position was not set. Read text through API (#153, #155). Fixes word was not saved/deleted. Fixes #170 and #69. Updates API (#175). Adds dependency to php-xml (#178, #181). Updates makefile (#179). Adds MeCab support on Mac (#135). Adds the option to hide/show word romanization (#119). Raises URL size limit to 2048 (#144).
when I open a text now, it shows the following...
Fatal Error: Your OS 'DAR' cannot use MeCab with this version of LWT!
Backtrace:
#0 /Applications/MAMP/htdocs/lwt-2.8.1/inc/kernel_utility.php(268): my_die('Your OS 'DAR' c...')
#1 /Applications/MAMP/htdocs/lwt-2.8.1/inc/session_utility.php(4498): get_mecab_path(' -O yomi ')
#2 /Applications/MAMP/htdocs/lwt-2.8.1/do_text_header.php(186): phonetic_reading('\xE8\x8C\xA8\xE5\x9F\x8E\xE7\x9C\x8C\xE3\x81\xAE\xE7\xB4\x8D...', 'ja')
#3 /Applications/MAMP/htdocs/lwt-2.8.1/do_text_header.php(313): browser_tts('\xE8\x8C\xA8\xE5\x9F\x8E\xE7\x9C\x8C\xE3\x81\xAE\xE7\xB4\x8D...', 'Japanese')
#4 /Applications/MAMP/htdocs/lwt-2.8.1/do_text.php(96): do_text_header_content(3, true)
#5 /Applications/MAMP/htdocs/lwt-2.8.1/do_text.php(144): do_text_desktop_content(3)
#6 /Applications/MAMP/htdocs/lwt-2.8.1/do_text.php(150): do_text_page(3)
Originally posted by @quopquai in #134 (comment)
@quopquai is using a Mac M2.
The text was updated successfully, but these errors were encountered: