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

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!

Related

Error installing dplyr library in R v4.2.2

I have updated my R version, and then updated my Rstudio, and now I am trying to install library(dplyr), but I get the following error:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘vctrs’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/vctrs’
Warning in install.packages :
installation of package ‘vctrs’ had non-zero exit status
and when I try installing the library(vctrs) as #MrFlick suggested, and run library(dplyr) again, it shows that a dependency called 'xfun' is not installed. When I try...
** package ‘xfun’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘xfun’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/xfun’
Warning in install.packages :
installation of package ‘xfun’ had non-zero exit status

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).

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

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 :)

Problem installing tidyverse in R 3.6.2 - no jsonlite

I am trying to install tidyverse after updating R for mac. I am using Mac OS Catalina 10.15.2
When installing, I get the following error message:
* installing *source* package ‘jsonlite’ ...
** package ‘jsonlite’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
ERROR: compilation failed for package ‘jsonlite’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/jsonlite’
Warning in install.packages :
installation of package ‘jsonlite’ had non-zero exit status
And when trying to load tidyverse. I get the following error message:
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘jsonlite’
I tried to install jsonlite as a seperate package, first uninstalling tidyverse, but got this error message:
package ‘json’ is not available (for R version 3.6.2)
Now at a bit of an impasse. Anyone know how to resolve this issue

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.

Resources