我遇到与此用户How to turn gpclibPermit() to TRUE
类似的问题解决方法是安装gpclib,但我收到错误
> install.packages("gpclib")
Package which is only available in source form, and may need compilation of C/C++/Fortran:
‘gpclib’
These will not be installed
然后我从http://cran.r-project.org/web/packages/gpclib/index.html下载gpclib_1.5-5.tar.gz并解压缩到库文件夹,即D:\ R \ R-3.2.0 \ library。
当我执行以下操作时,我仍然会收到错误:
> install.packages("gpclib")
Package which is only available in source form, and may need compilation of C/C++/Fortran:
‘gpclib’
These will not be installed
> gpclibPermitStatus()
[1] FALSE
谢谢
我试过
> install.packages("D:/R/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.0/etc/i386/Makeconf" -f "D:/R/R-3.2.0/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.0/library/gpclib'
Warning in install.packages :
running command '"D:/R/R-3.2.0/bin/x64/R" CMD INSTALL -l "D:\R\R-3.2.0\library" "D:/R/gpclib_1.5-5.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘D:/R/gpclib_1.5-5.tar.gz’ had non-zero exit status
答案 0 :(得分:1)
“解压缩到库文件夹”不是安装源包(您下载的.tar.gz)的正确方法。在R
内执行
install.packages(path_to_file, repos = NULL, type="source")
找到