2017-02-28 117 views
2

安装“以旧换新”包当调用install.packages("tm")我得到以下错误:不能R中的MacOS塞拉利昂

> install.packages("tm") 
Installing package into ‘/usr/local/lib/R/3.3/site-library’ 
(as ‘lib’ is unspecified) 
trying URL 'https://ftp.cixug.es/CRAN/src/contrib/tm_0.7.tar.gz' 
Content type 'application/x-gzip' length 526498 bytes (514 KB) 
================================================== 
downloaded 514 KB 

* installing *source* package ‘tm’ ... 
** package ‘tm’ successfully unpacked and MD5 sums checked 
** libs 
clang++ -I/usr/local/Cellar/r/3.3.2/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I"/usr/local/lib/R/3.3/site-library/BH/include" -I"/usr/local/lib/R/3.3/site-library/Rcpp/include" -fPIC -g -O2 -c RcppExports.cpp -o RcppExports.o 
clang -I/usr/local/Cellar/r/3.3.2/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I"/usr/local/lib/R/3.3/site-library/BH/include" -I"/usr/local/lib/R/3.3/site-library/Rcpp/include" -fPIC -g -O2 -c copy.c -o copy.o 
clang -I/usr/local/Cellar/r/3.3.2/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I"/usr/local/lib/R/3.3/site-library/BH/include" -I"/usr/local/lib/R/3.3/site-library/Rcpp/include" -fPIC -g -O2 -c init.c -o init.o 
clang++ -I/usr/local/Cellar/r/3.3.2/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I"/usr/local/lib/R/3.3/site-library/BH/include" -I"/usr/local/lib/R/3.3/site-library/Rcpp/include" -fPIC -g -O2 -c tdm.cpp -o tdm.o 
In file included from tdm.cpp:4: 
/usr/local/lib/R/3.3/site-library/BH/include/boost/tokenizer.hpp:59:9: error: field of type 'std::__1::__wrap_iter<const char *>' has private constructor 
     : first_(c.begin()), last_(c.end()), f_() { } 
     ^
tdm.cpp:25:28: note: in instantiation of function template specialization 'boost::tokenizer<boost::char_delimiters_separator<char, std::__1::char_traits<char> >, std::__1::__wrap_iter<const char *>, std::__1::basic_string<char> >::tokenizer<Rcpp::internal::const_string_proxy<16> >' requested here 
     boost::tokenizer<> tok(strings(index)); 
         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:1239:31: note: declared private here 
    _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {} 
          ^
In file included from tdm.cpp:4: 
/usr/local/lib/R/3.3/site-library/BH/include/boost/tokenizer.hpp:59:28: error: field of type 'std::__1::__wrap_iter<const char *>' has private constructor 
     : first_(c.begin()), last_(c.end()), f_() { } 
         ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:1239:31: note: declared private here 
    _LIBCPP_INLINE_VISIBILITY __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {} 
          ^
2 errors generated. 
make: *** [tdm.o] Error 1 
ERROR: compilation failed for package ‘tm’ 
* removing ‘/usr/local/lib/R/3.3/site-library/tm’ 
Warning in install.packages : 
    installation of package ‘tm’ had non-zero exit status 

The downloaded source packages are in 
    ‘/private/var/folders/02/6mkk426d3jd46mg35j577bwc0000gn/T/RtmpHPgAoU/downloaded_packages’ 

我的电脑运行MacOS的塞拉利昂。的sessionInfo()输出是:

R version 3.3.2 (2016-10-31) 
Platform: x86_64-apple-darwin16.3.0 (64-bit) 
Running under: macOS Sierra 10.12.3 

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  

loaded via a namespace (and not attached): 
[1] tools_3.3.2 

我没有安装“SLAM”的其他职位提到的问题。我也尝试安装“tm”,将依赖关系标志设置为TRUE,但产生相同的输出。我通过自制软件安装了R。我想知道是否还有其他步骤可以尝试。

+0

尝试install.packages(“以旧换新”,依赖= TRUE) – ZeroStack

+0

我想,太,得到了相同的错误。 – Pedro

+0

我有同样的问题。这是编译器/库的东西,但不知道是什么。 – alistaire

回答

0

我一直有同样的问题。目前,我已经从cran.r-project网站安装了tm 0.6。这为我消除了编译错误。

相关问题