Rhonda
Rhonda

Reputation: 1721

gpclibPermit() is FALSE, cannot install gpclib

I have similar problem as this user, How to turn gpclibPermit() to TRUE

Solution was to install gpclib, but I get error

> 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

Then I download gpclib_1.5-5.tar.gz from http://cran.r-project.org/web/packages/gpclib/index.html and extract to library folder, i.e D:\R\R-3.2.0\library.

When I execute the following, I still get the errors:

> 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

Thanks

Update

I tried

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

and got error

* 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

Upvotes: 0

Views: 2655

Answers (1)

Brian Diggs
Brian Diggs

Reputation: 58845

"Extract[ing] to library folder" is not the correct way to install a source package (the .tar.gz you downloaded). Inside R execute

install.packages(path_to_file, repos = NULL, type="source")

More details and approaches can be found at How do I install an R package from source?

Upvotes: 1

Related Questions