-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
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.
- install the latest compiler with
brew install gcc
- Put new symbolic links into the latest gcc compiler.
ln -s /usr/local/bin/gcc-8 /usr/local/bin/gcc
andln -s /usr/local/bin/g++-8 /usr/local/bin/g++
- put this line in your shell profile file, in my case
~/.bash_profile
:export PATH=$PATH:/usr/local/bin
- refresh your terminal such as
source ~/.bash_profile
- try to install the package again