安装R包

时间:2015-05-09 12:59:41

标签: r

当我尝试安装某些R软件包(例如Rgraphviz)时,我收到以下错误:

install.packages("Rgraphviz_2.12.0.tar.gz",repos=NULL,type="source")
* installing *source* package 'Rgraphviz' ...

**********************************************
WARNING: this package has a configure script
     It probably needs manual configuration
**********************************************


** libs
gcc -m32 -I"C:/PROGRA~1/R/R-31~1.2/include" -DNDEBUG     -        
I"d:/RCompile/CRANpkg/extralibs64/local/include"  -                                
Ilibwin/i386/include/graphviz -DHAVE_STDBOOL_H=1 -DHAVE_BOOL=1 - 
DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28 -DGRAPHVIZ_STATIC   -O3 -Wall  -
std=gnu99 -mtune=core2 -c LL_funcs.c -o LL_funcs.o
gcc: unrecognized option `-std=gnu99'
d:\RCompile\CRANpkg\extralibs64\local\include\.: Permission denied
make.exe: *** [LL_funcs.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-    
31~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.2/share/make/winshlib.mk"  
SHLIB="Rgraphviz.dll" OBJECTS="LL_funcs.o Rgraphviz.o RgraphvizInit.o   
agopen.o agread.o agwrite.o bezier.o buildEdgeList.o buildNodeList.o    
doLayout.o graphvizVersion.o init.o"' had status 2
ERROR: compilation failed for package 'Rgraphviz'
* removing 'C:/Program Files/R/R-3.1.2/library/Rgraphviz'
Warning messages:
1: running command '"C:/PROGRA~1/R/R-31~1.2/bin/i386/R" CMD INSTALL -l     
"C:\Program Files\R\R-3.1.2\library" "Rgraphviz_2.12.0.tar.gz"' had status 1 
 2: In install.packages("Rgraphviz_2.12.0.tar.gz", repos = NULL, type =    
 "source") :
 installation of package ‘Rgraphviz_2.12.0.tar.gz’ had non-zero exit status

我非常感谢任何评论。

1 个答案:

答案 0 :(得分:1)

首先要做的是照顾

d:\RCompile\CRANpkg\extralibs64\local\include\.: Permission denied

错误。检查该目录的文件权限;它属于管理员吗?确保您具有读取权限。