错误安装的R程序包(Linux Mint的17.1)QUOT;错误:C preprocessor" G ++ -E"失败完整性检查" [英] Error installing r packages (Linux Mint 17.1) "error: C preprocessor "g++ -E" fails sanity check"

查看:683
本文介绍了错误安装的R程序包(Linux Mint的17.1)QUOT;错误:C preprocessor" G ++ -E"失败完整性检查"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经转移到Linux系统($ P $ OSX pvious用户),我试图让我安装的R封装。

I have transfered to a Linux system (previous OSX user) and I am trying to get my R packages installed.

我跑过第一个问题是:

Warning in install.packages("stringi") :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead?  (y/n)

但我周围有使用发射R:

but I got around that by launching R using:

$ sudo R

如果有人有一个更加永久性的解决方案,使用'须藤'(因为我将在未来使用RStudio),我很想知道!

If someone has a more permanent solution to using 'sudo' (because I will be using RStudio in the future), I would be interested to know!

但现在,我有我不能找到解决的问题。当我尝试安装stringi',我得到了以下内容:

But for now, I have an issue that I cannot find a solution to. When I try to install 'stringi', I get the following:

* 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... yes
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/Rtmplf58Ya/R.INSTALL2d1959f5fc41/stringi':
configure: error: C preprocessor "g++ -E" fails sanity check
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/usr/local/lib/R/site-library/stringi’

这是什么行:

configure: error: C preprocessor "g++ -E" fails sanity check

指什么?在此基础上线Im相当肯定我的C语言编译器的工作原理:

refer to? Im fairly certain my C compiler works based on this line:

checking whether the C compiler works... yes

和这一行:

checking whether we are using the GNU C compiler... yes

但就像我说的,我刚刚开始钻研Linux系统的内部工作,所以我可能是完全错误的在这里。

but like I said, I am just now starting to delve into the inner workings of the Linux system, so I could be totally wrong here.

任何和所有的援助大大AP preciated!

Any and all assistance is greatly appreciated!

编辑:我使用Linux Mint的17.1(MATE)和R版本3.2.1

I am using Linux Mint 17.1 (MATE) and R version 3.2.1

推荐答案

尝试安装G ++:
命令和apt-get安装G ++

GNU C编译器(GCC)可以安装,但G ++并不总是默认安装的。

The GNU C Compiler (GCC) may be installed, but g++ isn't always installed by default.

至于不必须藤为R工作室,这是其在OS X上安装一个程序时,在输入密码相当于 - 它只是有点复杂之一的Linux系统(顺便提一句,OS X是基于BSD的Linux)。我想你也不一定需要使用须藤当你不安装包,虽​​然(不知道,还没有真正使用ř工作室是诚实的)。

As for having to sudo into R Studio, that's the equivalent of having to type your password in when installing a program in OS X - it's just one of the little intricacies of Linux systems (incidentally, OS X is based on BSD Linux). I imagine you won't necessarily need to use sudo when you're not installing a package though (not sure, haven't really used R Studio to be honest).

这篇关于错误安装的R程序包(Linux Mint的17.1)QUOT;错误:C preprocessor" G ++ -E"失败完整性检查"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆