2017-05-26 135 views
0

我试图安装软件包“tm”并得到一个错误(见下文)。从这个错误,我看不出有什么问题。包Rcpp已安装。使用R 3.4.0,Xubuntu 64.安装包“tm”失败

如何安装软件包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' 

回答

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

我得到这个错误:'错误:包或命名空间负载在GET失败 'TM'(信息[I,1],ENVIR = ENV): 懒加载数据库'/home/henk/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/R/Rcpp.rdb'is corrupt' – Henk

+1

Saw [this](https://github.com/wch /电影/问题/ 3)评论Github;重新启动R并执行'devtools :: install_cran(“tm”,force = T)',并且这次安装。 – Henk

0

尝试

sudo apt-get install r-cran-rcpp 
+0

已经试过了。如问题所述,库Rcpp已安装。 – Henk