1

I am trying to install package "tm" and get an error (see below). From this error I can't see what is going wrong. Package Rcpp is installed. Working on R 3.4.0, Xubuntu 64.

How can I install package 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 Answers 2

Reset to default

Trending sort

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

1
    At first we can install "devtools" packages and than install "tm" 
    by using devtools::install_cran("tm")
2
  • I get this error: Error: package or namespace load failed for 'tm' in get(Info[i, 1], envir = env): lazy-load database '/home/henk/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/R/Rcpp.rdb' is corrupt
    – Henk
    May 26, 2017 at 11:30
  • 1
    Saw this comment on Github; restarted R and did devtools::install_cran("tm", force = T) and this time it installed.
    – Henk
    May 26, 2017 at 11:35
0

try

sudo apt-get install r-cran-rcpp
1
  • Tried that already. As said in the question, library Rcpp is installed.
    – Henk
    May 26, 2017 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.