Warning in system(cmd): 'make not found, Rtools Anaconda - r

I try to install the latest version of rlang because i need it for scales and ggplot2. So I run:
install.packages("https://cran.r-project.org/src/contrib/rlang_1.0.2.tar.gz",repos=NULL,type="source")
But I have the following error message :
installing source package 'rlang' ...
** package 'rlang' correctement décompressé et sommes MD5 vérifiées
** using staged installation
** libs
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'rlang'
removing 'C:/Users/coich/anaconda3/envs/rstudio/lib/R/library/rlang'
Warning in install.packages :
installation of package ‘C:/Users/coich/AppData/Local/Temp/Rtmpaw0zcr/downloaded_packages/rlang_1.0.2.tar.gz’ had non-zero exit status
Then I saw that I have maybe to install the latest Rtools but I use Rstudio on Anaconda, so how I can do that.
Thank you for you aswer :)

Related

SDMTools package has non-zero exits

I have been trying to install the SDMTools package from github, using devtools, and have also tried to install from the Cran archive, below is the code for installing through github:
devtools::install_github("jjvanderwal/SDMTools")
this is then the code to try and install from Cran archive:
install.packages("https://cran.r-project.org/src/contrib/Archive/SDMTools/SDMTools_1.1-221.2.tar.gz", repos = NULL, type="source")
Both of these produce the same error,
* installing *source* package 'SDMTools' ...
** package 'SDMTools' successfully unpacked and MD5 sums checked
** using staged installation
** libs
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'SDMTools'
* removing 'C:/Users/micha/AppData/Local/R/win-library/4.2/SDMTools'
Warning in install.packages :
installation of package ‘C:/Users/micha/AppData/Local/Temp/Rtmps1CvqJ/downloaded_packages/SDMTools_1.1-221.2.tar.gz’ had non-zero exit status
If anyone would be able to help with any suggestions of what to try or any alternative methods, would be greatly appreciated!
I am currently working on version 4.2.1, (have also tried this on version 4.1.3).

How to install gpclib?

I get the following trying to install gpclib package in R 3.6.2:
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘gpclib’
These will not be installed
I have already installed Rtools.
I tried with the code:
install.packages("gpclib")
Trying with
install.packages("gpclib", type="source")
the message is:
installing *source package 'gpclib' ...
** package 'gpclib' successfully unpacked and MD5 sums checked **
using staged installation ** libs *** arch - i386 Warning in system(cmd) :
'make' not found ERROR: compilation failed for package 'gpclib' *
removing 'C:/Users/Juan/Documents/R/win-library/3.6/gpclib'
Warning message: In install.packages("gpclib", type = "source") :
installation of package ‘gpclib’ had non-zero exit status*

R: Error when installing archived package manually

I am trying to install an archived R package, SciencesPo, but it's not installing, even after installing the dependencies. The following is the code and the messages that follow
install.packages("C:\Users\Overman\Downloads\SciencesPo_1.4.1.tar.gz", repos = NULL, type = "source")
Installing package into ‘C:/Users/Overman/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
* installing source package 'SciencesPo' ...
** package 'SciencesPo' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'SciencesPo'
* removing 'C:/Users/Overman/Documents/R/win-library/3.5/SciencesPo'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘C:/Users/Overman/Downloads/SciencesPo_1.4.1.tar.gz’ had non-zero exit status
Installing Rtools solved the problem.

How to solve Issues with installation of 'rlang' package?

I am trying to install Tidyverse but I cannot get the rlang package to download.
I am using R version 3.5.3, and I have tried uninstalling and reinstalling R. Furthermore, I have tried to install Tidyverse as well as the rlang package individually.
install.packages("tidyverse")
install.packages("rlang", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
With both of these methods, I get the same error message.
* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘rlang’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rlang’
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
Any ideas would be greatly appreciated!

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.

Resources