安装包" tm"失败

时间:2017-05-26 11:04:43

标签: r installation tm

我正在尝试安装包" tm"并得到一个错误(见下文)。从这个错误中我无法看出出了什么问题。已安装包Rcpp。使用R 3.4.0,Xubuntu 64。

如何安装软件包tm?

* installing *source* package ‘tm’ ...
** package ‘tm’ successfully unpacked and MD5 sums checked
** libs
g++  -I/usr/share/R/include -DNDEBUG  -I"/home/henk/R/x86_64-pc-linux-gnu-library/3.4/BH/include" -I"/home/henk/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"    -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o
In file included from /home/henk/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include/Rcpp.h:34:0,
                 from RcppExports.cpp:4:
/home/henk/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include/Rcpp/grow.h:73:47: fatal error: Rcpp/generated/grow__pairlist.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:168: recipe for target 'RcppExports.o' failed
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘tm’
* removing ‘/home/henk/R/x86_64-pc-linux-gnu-library/3.4/tm’
Warning in install.packages :
  installation of package 'tm' had non-zero exit status

The downloaded source packages are in
    '/tmp/Rtmp3tKSat/downloaded_packages'

2 个答案:

答案 0 :(得分:1)

    At first we can install "devtools" packages and than install "tm" 
    by using devtools::install_cran("tm")

答案 1 :(得分:0)

尝试

sudo apt-get install r-cran-rcpp