【问题标题】:installation package "tm" fails安装包“tm”失败
【发布时间】:2017-05-26 11:04:42
【问题描述】:

我正在尝试安装包“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'

【问题讨论】:

    标签: r installation tm


    【解决方案1】:
        At first we can install "devtools" packages and than install "tm" 
        by using devtools::install_cran("tm")
    

    【讨论】:

    • 我收到此错误: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
    • 在 Github 上看到 this 评论;重新启动 R 并执行devtools::install_cran("tm", force = T),这次它安装了。
    【解决方案2】:

    试试

    sudo apt-get install r-cran-rcpp
    

    【讨论】:

    • 已经试过了。如问题中所述,已安装库 Rcpp。
    猜你喜欢
    • 1970-01-01
    • 2012-09-01
    • 2021-12-16
    • 2011-03-19
    • 2016-04-11
    • 2016-06-24
    • 2019-03-15
    • 1970-01-01
    相关资源
    最近更新 更多