gpclibPermit() is FALSE, cannot install gpclib - r

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

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

Related

Unable to install magrittr

Got a new company laptop and tried to install tidyr or installr, but it always fails because of magrittr.
If I want to install this package directly I'm getting the following error code:
* installing *source* package 'magrittr' ...
** package 'magrittr' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-33~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.1/share/make/winshlib.mk" SHLIB="magrittr.dll" OBJECTS="pipe.o utils.o"' had status 127
ERROR: compilation failed for package 'magrittr'
* removing 'C:/Users/xxxx/Documents/R/win-library/3.3/magrittr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\xxxx\Documents\R\win-library\3.3" C:\Users\xxxx\AppData\Local\Temp\1\RtmpMHlNI9/downloaded_packages/magrittr_2.0.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘magrittr’ had non-zero exit status
I don't have admin privileges on this computer and could imagine that this could be the source of the problem, but I'm not sure.
What I tried:
Changed folder for libraries
Reinstalled all libraries
Tried different cron repos
Tried to install it on this way: install.packages("magrittr", update.packages(checkBuilt = TRUE))
Always the same error.
Is there any other way to install it?
Installing an archived version from source will work.
install.packages("cran.r-project.org/src/contrib/Archive/magrittr/…", repos = NULL, type="source")
You can utilize conda to install it:
conda install -c r r-magrittr
Reference:
https://anaconda.org/r/r-magrittr

Installation of archived package "prob" not working in R

I'm running R 3.4.2 and R Studio 1.0.153. I want to install the prob package in R. The prob package in an archived file. It is located here. I am trying to install the prob_1.0-0.tar.gz package. I have no problem downloading and opening the package archive file. The code is below, it seems I need to install the fAsianOptions package.
ERROR: dependency 'fAsianOptions' is not available for package 'prob'
* removing 'C:/Users/blake_000/Documents/R/win-library/3.4/prob' Warning in install.packages : running command
'"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l
"C:\Users\blake_000\Documents\R\win-library\3.4"
"C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/prob_1.0-0.tar.gz"'
had status 1 Warning in install.packages : installation of package
‘C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/prob_1.0-0.tar.gz’
had non-zero exit status
Unfortunately, the fAsianOptions package is also archived. It is located here and I downloaded version fAsianOptions_3010.79.tar.gz. There were a number of dependencies but I installed the required packages (timeDate, timeSeries, etc.)
However, the fAsianOptions package is not installing. The error code reads as follows:
install.packages("C:/Users/blake_000/Google Drive/Life/CSUEB/Fall
2017/6204- Probability/R Code/fAsianOptions_3010.79.tar.gz", repos =
NULL, type = "source") Installing package into
‘C:/Users/blake_000/Documents/R/win-library/3.4’ (as ‘lib’ is
unspecified)
* installing source package 'fAsianOptions' ...
** package 'fAsianOptions' successfully unpacked and MD5 sums checked
** libs
*** arch - i386 Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-34~1.2/etc/i386/Makeconf" -f
"C:/PROGRA~1/R/R-34~1.2/share/make/winshlib.mk"
SHLIB="fAsianOptions.dll" SHLIB_LIBADD='$(FLIBS)'
OBJECTS="EBMAsianOptions.o GammaFunctions.o
HypergeometricFunctions.o"' had status 127 ERROR: compilation failed
for package 'fAsianOptions'
* removing 'C:/Users/blake_000/Documents/R/win-library/3.4/fAsianOptions' Warning
in install.packages : running command
'"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l
"C:\Users\blake_000\Documents\R\win-library\3.4"
"C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/fAsianOptions_3010.79.tar.gz"'
had status 1 Warning in install.packages : installation of package
‘C:/Users/BLAKE_~1/GOOGLE~1/Life/CSUEB/FALL20~1/6204-P~1/RCODE~1/fAsianOptions_3010.79.tar.gz’
had non-zero exit status
I'm hoping that someone can help me to install the fAsianOptions dependency so I can install the prob package. Or, if there's an easier way, please let me know!
I had the same problem. I solved it by installing lower version of R -2.9. prob is available in repository for this version.

Error when installing gpclib

R version 3.2.1
I downloaded gpclib_1.5-5.tar.gz from http://cran.r-project.org/web/packages/gpclib/index.html and attempted to install the package with
install.packages("D:/GIS/gpclib_1.5-5.tar.gz", repos = NULL, type = "source")
I get the 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.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
How do I troubleshoot this?
Extra Information
I am ultimately trying to create heat maps, and am following this tutorial
http://spatialanalysis.co.uk/wp-content/uploads/2013/04/james_cheshire_ggplot_intro_blog.pdf
You'll need to install Rtools to install the R compiler libraries:
http://cran.r-project.org/bin/windows/Rtools/
Otherwise, R will have issues compiling from source code.

R Packages Installation Error on Ubuntu

I am trying to install the R package "colorspace" in Ubuntu Linux from local repository as follows:
install.packages("/home/colorspace_1.2-4.tar.gz", repos = NULL, type="source")
This throws the following error:
Installing package into '/home/vertica/R/x86_64-unknown-linux-gnu-library/3.0'
(as 'lib' is unspecified)
* installing *source* package 'colorspace' ...
** package 'colorspace' successfully unpacked and MD5 sums checked
** libs
sh: make: command not found
ERROR: compilation failed for package 'colorspace'
* removing '/home/vertica/R/x86_64-unknown-linux-gnu-library/3.0/colorspace'
Warning message:
In install.packages("/home/colorspace_1.2-4.tar.gz", :
installation of package '/home/colorspace_1.2-4.tar.gz' had non-zero exit
status
Could someone help me with this issue?
Thank you.
Ravi
Its saying it can't find "make", which makes me think you don't have all the compilers and so on that you need to build packages from source.
Install the "build-essential" package, something like:
sudo apt-get install build-essential
from your command line (not from R!)

Error while installing R packages

While trying to install the 'Rook' package in R i'm getting the following error:
** package ‘Rook’ successfully unpacked and MD5 sums checked
** libs
sh: 1: -f: not found
ERROR: compilation failed for package ‘Rook’
* removing ‘/usr/lib/R/site-library/Rook’
The downloaded packages are in
‘/tmp/RtmpPW6kC2/downloaded_packages’
Warning message:
In install.packages("Rook", repos = "http://cran.r-project.org") :
installation of package ‘Rook’ had non-zero exit status
I used both the install.packages() function and the terminal to install the package, but received the same message. Any ideas?
OS: Ubuntu 12.04.

Resources