Skip to content

Error during install on MacOS Mojave #51

@Kensuke-Mitsuzawa

Description

@Kensuke-Mitsuzawa

I encounter the error when I try to install the package on MacOS Mojave.

    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/kensuke-mi/.pyenv/versions/anaconda3-5.3.1/include -arch x86_64 -I/Users/kensuke-mi/.pyenv/versions/anaconda3-5.3.1/include -arch x86_64 -I/usr/local/Cellar/mecab/0.996/include -I/Users/kensuke-mi/.pyenv/versions/anaconda3-5.3.1/include/python3.7m -c MeCab_wrap.cpp -o build/temp.macosx-10.7-x86_64-3.7/MeCab_wrap.o
    warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    MeCab_wrap.cpp:3051:10: fatal error: 'stdexcept' file not found
    #include <stdexcept>
             ^~~~~~~~~~~
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1

Solution

The main reason for the error is that C/C++ compiler is the old version.

So, it's totally OK if you update C/C++ compiler.

  1. install the latest compiler with brew install gcc
  2. Put new symbolic links into the latest gcc compiler. ln -s /usr/local/bin/gcc-8 /usr/local/bin/gcc and ln -s /usr/local/bin/g++-8 /usr/local/bin/g++
  3. put this line in your shell profile file, in my case ~/.bash_profile: export PATH=$PATH:/usr/local/bin
  4. refresh your terminal such as source ~/.bash_profile
  5. try to install the package again

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions