安装gpclib时出错

时间:2015-06-25 13:10:01

标签: r google-maps heatmap

R版本3.2.1

我从http://cran.r-project.org/web/packages/gpclib/index.html下载了gpclib_1.5-5.tar.gz并尝试使用

安装软件包

install.packages("D:/GIS/gpclib_1.5-5.tar.gz", repos = NULL, type = "source")

我收到错误

* installing *source* package 'gpclib' ...
** package 'gpclib' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
Warning: running command 'make -f "D:/R/R-3.2.1/etc/i386/Makeconf" -f "D:/R/R-3.2.1/share/make/winshlib.mk" SHLIB="gpclib.dll" OBJECTS="Rgpc.o gpc.o"' had status 127
ERROR: compilation failed for package 'gpclib'
* removing 'D:/R/R-3.2.1/library/gpclib'
Warning in install.packages :
  running command '"D:/R/R-3.2.1/bin/x64/R" CMD INSTALL -l "D:\R\R-3.2.1\library" "D:/GIS/gpclib_1.5-5.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘D:/GIS/gpclib_1.5-5.tar.gz’ had non-zero exit status

如何解决此问题?

额外信息

我最终尝试创建热图,并遵循本教程

http://spatialanalysis.co.uk/wp-content/uploads/2013/04/james_cheshire_ggplot_intro_blog.pdf

1 个答案:

答案 0 :(得分:6)

您需要安装Rtools才能安装R编译器库:

http://cran.r-project.org/bin/windows/Rtools/

否则,R将从源代码编译问题。