0

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
Community
  • 1
  • 1
Rhonda
  • 1,661
  • 5
  • 31
  • 65

1 Answers1

1

"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?

Community
  • 1
  • 1
Brian Diggs
  • 57,757
  • 13
  • 166
  • 188
  • This helps, but I have another question that will be posted separately – Rhonda Jun 25 '15 at 13:06
  • @SohniMahiwal Hard to tell from the (updated) error message, but it may be that you don't have Rtools installed, which is necessary to build a package from source. – Brian Diggs Jun 25 '15 at 15:15