2017-05-26 207 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