【问题标题】:error installing a package in R pertaining stringr package [duplicate]在 R 中安装与 stringr 包相关的包时出错 [重复]
【发布时间】:2015-11-25 09:58:04
【问题描述】:

我在 RStudio 中安装软件包时遇到问题。 我正在使用 Linux Mint,并且已经安装了 libgdal-dev 和 libproj-dev。

这是终端中的文本:

* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for local ICUDT_DIR... icu55/data
checking for R_HOME... /usr/lib/R
checking for R... /usr/lib/R/bin/R
checking for R >= 3.1.0... no
*** disabling C++11 use
checking for cat... /bin/cat
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... g++ -E
configure: error: in `/tmp/Rtmp3NFJZN/R.INSTALL28c32774afde/stringi':
configure: error: C preprocessor "g++ -E" fails sanity check
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/home/varum/R/x86_64-pc-linux-gnu-library/3.0/stringi’

Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpv9QKWM/downloaded_packages’

任何想法问题出在哪里?

【问题讨论】:

  • config.log应该有更多的细节。
  • 许多问题的错误信息相似或相同。请指出您阅读过哪些(如果有的话)以查看他们的解决方案(如果有)是否可以解决您的问题。

标签: linux r package linux-mint


【解决方案1】:

检查 R >= 3.1.0...否

更新您的 R 版本可能会有所帮助。当前版本是 3.2.2 版

查看安装指南here

【讨论】:

    【解决方案2】:

    也许安装 g++ 会有所帮助

    sudo apt-get install g++
    

    【讨论】:

    • 非常感谢!这有帮助!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-01
    • 2019-02-28
    • 2018-08-31
    • 1970-01-01
    相关资源
    最近更新 更多