我目前正在尝试运行最初在2.11.0下运行的一些R代码。我使用的R版本2.14.1不运行代码。我不熟悉R以及它如何向后兼容。 (我的问题可能对我所知道的所有版本都无能为力;我会很高兴知道这是我做错的事情。)其余的代码是不相关的;即使我自己运行,我的安装也会失败。安装R软件包。包含目录为空。开发标题
#these fail
install.packages("gtools",repos="http://cran.r-project.org")
install.packages("minet", repos="http://cran.r-project.org")
#these work
install.packages("psych", repos="http://cran.r-project.org")
install.packages("qvalue",repos="http://cran.r-project.org")
install.packages("R2HTML",repos="http://cran.r-project.org")
除了上面列出的我还尝试了其他安装方法。我曾尝试安装和编译早期版本的gtools和minet。我试图从其他回购(biocLite)获取当前版本的软件包。但是,所有安装尝试都会产生相同的故障多一点背景知识,我不是我试图运行此代码的机器上的超级用户。我可以问那些超级用户的小人物(那些不影响机器其他用户的人)。我已经能够安装其他软件包了;不过正如我早说的,如果我有一个简单的问题,我会很高兴。这里有一些失败。
* installing *source* package ‘gtools’ ...
** libs
Warning: R include directory is empty -- perhaps need to install R-devel.rpm or similar
gcc -m64 -std=gnu99 -I/usr/include/R -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c setTCPNoDelay.c -o setTCPNoDelay.o
setTCPNoDelay.c:1:15: error: R.h: No such file or directory
setTCPNoDelay.c:2:24: error: Rinternals.h: No such file or directory
setTCPNoDelay.c: In function ‘checkStatus’:
setTCPNoDelay.c:66: warning: implicit declaration of function ‘strncpy’
setTCPNoDelay.c:66: warning: incompatible implicit declaration of built-in function ‘strncpy’
setTCPNoDelay.c:72: warning: implicit declaration of function ‘strerror’
setTCPNoDelay.c:72: warning: passing argument 2 of ‘strncpy’ makes pointer from integer without a cast
make: *** [setTCPNoDelay.o] Error 1
ERROR: compilation failed for package ‘gtools’
您需要将R标头能够编译对他们( “需要安装R-devel.rpm或类似的”)。 – 2012-03-30 21:10:39
@JoshuaUlrich 我该如何去获取所说的标题以及我将它放在哪里? – order 2012-03-30 21:14:44
,这取决于您的操作系统以及它的设置。询问安装R的人也安装开发头文件。 – 2012-03-30 21:20:06