安装 R 包。包含目录为空。开发标头

ord*_*der 5 unix r

我目前正在尝试运行一些最初在 2.11.0 下运行的 R 代码。我使用的 R 版本 2.14.1 无法运行代码。我不熟悉 R 及其向后兼容性。(据我所知,我的问题可能与版本无关;我会很高兴得知这是我做错的事情。)其余的代码是无关紧要的;即使我自己运行,我的安装也会失败。

\n\n
#these fail\ninstall.packages("gtools",repos="http://cran.r-project.org")\ninstall.packages("minet", repos="http://cran.r-project.org")\n#these work\ninstall.packages("psych", repos="http://cran.r-project.org")\ninstall.packages("qvalue",repos="http://cran.r-project.org")\ninstall.packages("R2HTML",repos="http://cran.r-project.org")\n
Run Code Online (Sandbox Code Playgroud)\n\n

除了上面列出的方法之外,我还尝试了其他安装方法。我尝试过安装和编译早期版本的gtools和minet。我尝试从其他存储库(biocLite)获取该包的当前版本。然而,所有安装尝试都会产生相同的失败。对于更多背景知识,我不是我尝试运行此代码的计算机上的超级用户。我可以向超级用户请求一些小恩惠(不影响机器的其他用户的恩惠)。我已经能够很好地安装其他软件包;不过正如我之前所说,如果我有一个简单的问题,我会很高兴。以下是一些失败的例子。

\n\n
* installing *source* package \xe2\x80\x98gtools\xe2\x80\x99 ...\n** libs\nWarning: R include directory is empty -- perhaps need to install R-devel.rpm or similar\ngcc -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\nsetTCPNoDelay.c:1:15: error: R.h: No such file or directory\nsetTCPNoDelay.c:2:24: error: Rinternals.h: No such file or directory\nsetTCPNoDelay.c: In function \xe2\x80\x98checkStatus\xe2\x80\x99:\nsetTCPNoDelay.c:66: warning: implicit declaration of function \xe2\x80\x98strncpy\xe2\x80\x99\nsetTCPNoDelay.c:66: warning: incompatible implicit declaration of built-in function \xe2\x80\x98strncpy\xe2\x80\x99\nsetTCPNoDelay.c:72: warning: implicit declaration of function \xe2\x80\x98strerror\xe2\x80\x99\nsetTCPNoDelay.c:72: warning: passing argument 2 of \xe2\x80\x98strncpy\xe2\x80\x99 makes pointer from integer without a cast\nmake: *** [setTCPNoDelay.o] Error 1\nERROR: compilation failed for package \xe2\x80\x98gtools\xe2\x80\x99\n
Run Code Online (Sandbox Code Playgroud)\n

ord*_*der 0

出现此错误是因为我登录的特定机器没有开发标头。我的系统管理员指示我登录另一台机器。比较奇怪的是,R 允许我安装一些没有标头的包。如果您在尝试安装 R 软件包时间歇性地收到此投诉,则可能与 Joshua Ulrich 在评论中提到的开发标头有关。