【发布时间】:2015-09-26 17:40:57
【问题描述】:
我已转移到 Linux 系统(以前的 OSX 用户),我正在尝试安装我的 R 包。
我遇到的第一个问题是:
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 解决了这个问题:
$ sudo R
如果有人对使用“sudo”有更永久的解决方案(因为我将来会使用 RStudio),我很想知道!
但是现在,我遇到了一个我找不到解决方案的问题。当我尝试安装“stringi”时,我得到以下信息:
* 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
参考?我相当确定我的 C 编译器基于这一行工作:
checking whether the C compiler works... yes
还有这一行:
checking whether we are using the GNU C compiler... yes
但就像我说的,我现在才开始深入研究 Linux 系统的内部工作原理,所以我可能完全错了。
非常感谢任何和所有的帮助!
编辑:我使用的是 Linux Mint 17.1 (MATE) 和 R 版本 3.2.1
【问题讨论】: