Closed yuanzhouIR closed 6 years ago
Hi @SyuuGenn ,
/bin/sh: mecab-config: command not found
means that you didn't install MeCab
libraries before installing the package, or R shell couldn't find the libraries.
Your system is MacOS X, therefore downloading MeCab source and IPA dictionary.
In the Terminal, go to the directory you downloaded two files and run following commands:
$ tar zxfv mecab-0.996.tar.gz
$ cd mecab-0.996
$ ./configure
$ make
$ make check
$ sudo
$ make install
and
$ tar zxfv mecab-ipadic-2.7.0-200720801.tar.gz
$ cd mecab-ipadic-2.7.0-20070801
$ ./configure
$ make
$ su
$ make install
It is little bit weird for me, since you installed RMeCab
and it needs MeCab library too.
Maybe you should check your PATH variable. Is which mecab-config
(in the Terminal) returns the directory?
Thank you, @junhewk ! I ran your code, and then installed "RccpMeCab" successfully.
Hello! I tried to install the 'RccpMeCab' package, but failed. I have installed the 'RMeCab' package, and when I ran
install.packages("RccpMeCab")
, the information returned is as following:trying URL 'https://cran.rstudio.com/src/contrib/RcppMeCab_0.0.1.1.tar.gz' Content type 'application/x-gzip' length 23491 bytes (22 KB)
downloaded 22 KB
mecab-config --cflags
-fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o /bin/sh: mecab-config: command not found clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppParallel/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include" -I/usr/local/includemecab-config --cflags
-fPIC -Wall -g -O2 -c posLoopRcpp.cpp -o posLoopRcpp.o /bin/sh: mecab-config: command not found clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppParallel/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include" -I/usr/local/includemecab-config --cflags
-fPIC -Wall -g -O2 -c posParallelRcpp.cpp -o posParallelRcpp.o /bin/sh: mecab-config: command not found clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppParallel/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include" -I/usr/local/includemecab-config --cflags
-fPIC -Wall -g -O2 -c posRcpp.cpp -o posRcpp.o /bin/sh: mecab-config: command not found /bin/sh: mecab-config: command not found clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o RcppMeCab.so RcppExports.o posLoopRcpp.o posParallelRcpp.o posRcpp.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation /bin/sh: mecab-config: command not found installing to /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppMeCab/libs R inst byte-compile and prepare package for lazy loading help * installing help indices building package indices ** testing if installed package can be loaded Error: package or namespace load failed for ‘RcppMeCab’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppMeCab/libs/RcppMeCab.so': dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppMeCab/libs/RcppMeCab.so, 6): Symbol not found: _mecab_destroy Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppMeCab/libs/RcppMeCab.so Expected in: flat namespace in /Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppMeCab/libs/RcppMeCab.so Error: loading failed Execution halted ERROR: loading failedThe downloaded source packages are in ‘/private/var/folders/hg/q395slr53q5_6g6xcwy8cxnw0000gn/T/Rtmp6QRLLL/downloaded_packages’
My environment information is
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] RMeCab_1.00 devtools_1.13.5
loaded via a namespace (and not attached): [1] httr_1.3.1 compiler_3.5.0 rvcheck_0.1.0 R6_2.2.2 tools_3.5.0 withr_2.1.2
[7] curl_3.2 memoise_1.1.0 git2r_0.21.0 digest_0.6.15
Can you help me to fix the problem?