markburns / mecab

MeCab ruby binding with gemspec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gem install mecab fails on windows

handrake opened this issue · comments

C:\Users\handrake>gem install mecab
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions.  This could take a while...
ERROR:  Error installing mecab:
        ERROR: Failed to build gem native extension.

    current directory: C:/Users/handrake/scoop/apps/ruby/current/gems/gems/mecab-0.996/ext/mecab
C:/Users/handrake/scoop/apps/ruby/current/bin/ruby.exe -r ./siteconf20171006-3004-1ifoez1.rb extconf.rb
checking for make... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Users/handrake/scoop/apps/ruby/current/bin/$(RUBY_BASE_NAME)
        --with-mecab-config
        --without-mecab-config
        --enable-mecab-config
        --disable-mecab-config
extconf.rb:12:in ``': No such file or directory - mecab-config --libs-only-L (Errno::ENOENT)
        from extconf.rb:12:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  C:/Users/handrake/scoop/apps/ruby/current/gems/extensions/x64-mingw32/2.4.0/mecab-0.996/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Users/handrake/scoop/apps/ruby/current/gems/gems/mecab-0.996 for inspection.
Results logged to C:/Users/handrake/scoop/apps/ruby/current/gems/extensions/x64-mingw32/2.4.0/mecab-0.996/gem_make.out

After some research, it seems I need mecab-config binary from mecab package, but mecab installer version doesn't seem to come with it. Does it mean I have to build mecab itself from source in order to install mecab ruby?

Thank you very much in advance.

Hey sorry, I don't run Windows.
I'd be happy to accept a pull request to update the docs to make it easier if you manage to fix this.
Or to point at a more appropriate gem if you find a better solution for windows.
I believe there are a few possibly more up to date gems out there.