Error installing leaflet package for R in ubuntu - r

I can't install the leaflet packages for R in ubuntu. I've correctly install R and I was able to install some other packages like "RCurl" but I cannot install leaflet... Here are the output I get :
install.packages("leaflet",dep=T)
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning: dependency ‘plyr’ is not available
also installing the dependencies ‘scales’, ‘rgdal’
trying URL 'http://cran.univ-lyon1.fr/src/contrib/scales_0.3.0.tar.gz'
Content type 'application/x-gzip' length 57030 bytes (55 Kb)
opened URL
==================================================
downloaded 55 Kb
trying URL 'http://cran.univ-lyon1.fr/src/contrib/rgdal_1.1-3.tar.gz'
Content type 'application/x-gzip' length 1647483 bytes (1.6 Mb)
opened URL
==================================================
downloaded 1.6 Mb
trying URL 'http://cran.univ-lyon1.fr/src/contrib/leaflet_1.0.0.tar.gz'
Content type 'application/x-gzip' length 401681 bytes (392 Kb)
opened URL
==================================================
downloaded 392 Kb
ERROR: dependency ‘plyr’ is not available for package ‘scales’
* removing ‘/usr/local/lib/R/site-library/scales’
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgdal: 1.1-3
checking for /usr/bin/svnversion... no
configure: svn revision: 594
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/local/lib/R/site-library/rgdal’
ERROR: dependency ‘scales’ is not available for package ‘leaflet’
* removing ‘/usr/local/lib/R/site-library/leaflet’
The downloaded source packages are in
‘/tmp/Rtmp9C0NCQ/downloaded_packages’
Warning messages:
1: In install.packages("leaflet", dep = T) :
installation of package ‘scales’ had non-zero exit status
2: In install.packages("leaflet", dep = T) :
installation of package ‘rgdal’ had non-zero exit status
3: In install.packages("leaflet", dep = T) :
installation of package ‘leaflet’ had non-zero exit status
It looks like this is a dependencies problem but I did try to install it with install.packages("leaflet",dep=T). Do you have a idea ?

Related

Error installing ggplot2 in RStudio - MacOS

I'd like to express my thanks in advance for your help. I have been attempting to install the package "ggplot2" for two weeks now in RStudio, and cannot figure out my non-zero exit status errors. I have posted the resulting error code at the end of this message. I have successfully installed some packages, but have failed to install ggplot2 and plotly. I have an assignment due using these packages tonight and would greatly appreciate any insight you can give.
> install.packages("ggplot2", dependencies = TRUE)
also installing the dependencies ‘cli’, ‘rlang’, ‘lifecycle’, ‘scales’
There are binary versions available but the source versions are later:
binary source needs_compilation
cli 3.2.0 3.4.1 TRUE
rlang 1.0.2 1.0.6 TRUE
lifecycle 1.0.1 1.0.3 FALSE
scales 1.1.1 1.2.1 FALSE
ggplot2 3.3.5 3.3.6 FALSE
Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes
installing the source packages ‘cli’, ‘rlang’, ‘lifecycle’, ‘scales’, ‘ggplot2’
trying URL 'http://archive.linux.duke.edu/cran/src/contrib/cli_3.4.1.tar.gz'
Content type 'application/octet-stream' length 540044 bytes (527 KB)
==================================================
downloaded 527 KB
trying URL 'http://archive.linux.duke.edu/cran/src/contrib/rlang_1.0.6.tar.gz'
Content type 'application/octet-stream' length 742508 bytes (725 KB)
==================================================
downloaded 725 KB
trying URL 'http://archive.linux.duke.edu/cran/src/contrib/lifecycle_1.0.3.tar.gz'
Content type 'application/octet-stream' length 106854 bytes (104 KB)
==================================================
downloaded 104 KB
trying URL 'http://archive.linux.duke.edu/cran/src/contrib/scales_1.2.1.tar.gz'
Content type 'application/octet-stream' length 270609 bytes (264 KB)
==================================================
downloaded 264 KB
trying URL 'http://archive.linux.duke.edu/cran/src/contrib/ggplot2_3.3.6.tar.gz'
Content type 'application/octet-stream' length 3061989 bytes (2.9 MB)
==================================================
downloaded 2.9 MB
* installing *source* package ‘cli’ ...
** package ‘cli’ 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 ‘cli’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/cli’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/cli’
Warning in install.packages :
installation of package ‘cli’ had non-zero exit status
* installing *source* package ‘rlang’ ...
** package ‘rlang’ 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 ‘rlang’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rlang’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rlang’
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
* installing *source* package ‘lifecycle’ ...
** package ‘lifecycle’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘rlang’ 1.0.2 is being loaded, but >= 1.0.6 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘lifecycle’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/lifecycle’
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependency ‘lifecycle’ is not available for package ‘scales’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/scales’
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependency ‘scales’ is not available for package ‘ggplot2’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/sr/02bnxzdx0hvcp6c37xfhlf300000gn/T/Rtmpje9xhl/downloaded_packages’
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’

Cannot install package Rdpack due to error "had non-zero exit status"

I am using RStudio 2022.02.3 Build 492 for mac. I am trying to install the package Rdpack as a requirement to load another package and it does not work. Could you please help to tell me what the problem is and what I should do to solve it. And here is the error message I received:
install.packages('Rdpack')
also installing the dependency ‘rbibutils’
There are binary versions available but the source versions are later:
binary source needs_compilation
rbibutils 2.2.7 2.2.8 TRUE
Rdpack 2.3 2.3.1 FALSE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source packages ‘rbibutils’, ‘Rdpack’
trying URL 'https://cran.rstudio.com/src/contrib/rbibutils_2.2.8.tar.gz'
Content type 'application/x-gzip' length 882817 bytes (862 KB)
==================================================
downloaded 862 KB
trying URL 'https://cran.rstudio.com/src/contrib/Rdpack_2.3.1.tar.gz'
Content type 'application/x-gzip' length 703156 bytes (686 KB)
==================================================
downloaded 686 KB
* installing *source* package ‘rbibutils’ ...
** package ‘rbibutils’ 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 ‘rbibutils’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rbibutils’
Warning in install.packages :
installation of package ‘rbibutils’ had non-zero exit status
ERROR: dependency ‘rbibutils’ is not available for package ‘Rdpack’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rdpack’
Warning in install.packages :
installation of package ‘Rdpack’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/r2/_r7yln992kq1x9pg298ql_s40000gn/T/RtmpMko8Ru/downloaded_packages’
Thank you so much for your help!

R -- unable to install "tidyverse" packages

I tried installing "tidyverse" (and many other packages) and it didn't work!!
I have googled and read a bunch of solutions that people have given to similar problems and I tried them (e.g., redownloading R, Rstudio; go to tool > global option and uncheck http; etc.) but they didn't work either. Below is what I can see when tried:
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages("tidyverse")
also installing the dependencies ‘markdown’, ‘rlang’, ‘knitr’, ‘base64enc’, ‘tidyselect’, ‘Rcpp’, ‘isoband’, ‘vctrs’, ‘fs’, ‘rmarkdown’, ‘broom’, ‘dbplyr’, ‘dplyr’, ‘ggplot2’, ‘haven’, ‘hms’, ‘lubridate’, ‘modelr’, ‘reprex’, ‘tidyr’, ‘xml2’
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘markdown’ ‘rlang’
‘base64enc’ ‘tidyselect’ ‘Rcpp’ ‘isoband’ ‘vctrs’ ‘fs’ ‘dplyr’ ‘haven’ ‘lubridate’ ‘tidyr’ ‘xml2’
Do you want to attempt to install these from sources? (Yes/no/cancel) yes
installing the source packages ‘markdown’, ‘rlang’, ‘knitr’, ‘base64enc’, ‘tidyselect’, ‘Rcpp’, ‘isoband’, ‘vctrs’, ‘fs’, ‘rmarkdown’, ‘broom’, ‘dbplyr’, ‘dplyr’, ‘ggplot2’, ‘haven’, ‘hms’, ‘lubridate’, ‘modelr’, ‘reprex’, ‘tidyr’, ‘xml2’, ‘tidyverse’
trying URL 'https://cran.rstudio.com/src/contrib/markdown_1.1.tar.gz'
Content type 'application/x-gzip' length 81050 bytes (79 KB)
==================================================
downloaded 79 KB
trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.4.5.tar.gz'
Content type 'application/x-gzip' length 816813 bytes (797 KB)
==================================================
downloaded 797 KB
trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.28.tar.gz'
Content type 'application/x-gzip' length 884866 bytes (864 KB)
==================================================
downloaded 864 KB
trying URL 'https://cran.rstudio.com/src/contrib/base64enc_0.1-3.tar.gz'
Content type 'application/x-gzip' length 7833 bytes
==================================================
downloaded 7833 bytes
trying URL 'https://cran.rstudio.com/src/contrib/tidyselect_1.0.0.tar.gz'
Content type 'application/x-gzip' length 151161 bytes (147 KB)
==================================================
downloaded 147 KB
trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_1.0.4.tar.gz'
Content type 'application/x-gzip' length 2750216 bytes (2.6 MB)
==================================================
downloaded 2.6 MB
trying URL 'https://cran.rstudio.com/src/contrib/isoband_0.2.0.tar.gz'
Content type 'application/x-gzip' length 1894070 bytes (1.8 MB)
==================================================
downloaded 1.8 MB
trying URL 'https://cran.rstudio.com/src/contrib/vctrs_0.2.4.tar.gz'
Content type 'application/x-gzip' length 787455 bytes (768 KB)
==================================================
downloaded 768 KB
trying URL 'https://cran.rstudio.com/src/contrib/fs_1.3.2.tar.gz'
Content type 'application/x-gzip' length 820272 bytes (801 KB)
==================================================
downloaded 801 KB
trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_2.1.tar.gz'
Content type 'application/x-gzip' length 3186382 bytes (3.0 MB)
==================================================
downloaded 3.0 MB
trying URL 'https://cran.rstudio.com/src/contrib/broom_0.5.5.tar.gz'
Content type 'application/x-gzip' length 1223871 bytes (1.2 MB)
==================================================
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/src/contrib/dbplyr_1.4.2.tar.gz'
Content type 'application/x-gzip' length 303397 bytes (296 KB)
==================================================
downloaded 296 KB
trying URL 'https://cran.rstudio.com/src/contrib/dplyr_0.8.5.tar.gz'
Content type 'application/x-gzip' length 1378766 bytes (1.3 MB)
==================================================
downloaded 1.3 MB
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.3.0.tar.gz'
Content type 'application/x-gzip' length 3031461 bytes (2.9 MB)
==================================================
downloaded 2.9 MB
trying URL 'https://cran.rstudio.com/src/contrib/haven_2.2.0.tar.gz'
Content type 'application/x-gzip' length 272575 bytes (266 KB)
==================================================
downloaded 266 KB
trying URL 'https://cran.rstudio.com/src/contrib/hms_0.5.3.tar.gz'
Content type 'application/x-gzip' length 134669 bytes (131 KB)
==================================================
downloaded 131 KB
trying URL 'https://cran.rstudio.com/src/contrib/lubridate_1.7.4.tar.gz'
Content type 'application/x-gzip' length 449850 bytes (439 KB)
==================================================
downloaded 439 KB
trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.6.tar.gz'
Content type 'application/x-gzip' length 121295 bytes (118 KB)
==================================================
downloaded 118 KB
trying URL 'https://cran.rstudio.com/src/contrib/reprex_0.3.0.tar.gz'
Content type 'application/x-gzip' length 1052597 bytes (1.0 MB)
==================================================
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/src/contrib/tidyr_1.0.2.tar.gz'
Content type 'application/x-gzip' length 812005 bytes (792 KB)
==================================================
downloaded 792 KB
trying URL 'https://cran.rstudio.com/src/contrib/xml2_1.2.5.tar.gz'
Content type 'application/x-gzip' length 273448 bytes (267 KB)
==================================================
downloaded 267 KB
trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.3.0.tar.gz'
Content type 'application/x-gzip' length 712837 bytes (696 KB)
==================================================
downloaded 696 KB
* installing *source* package ‘markdown’ ...
** package ‘markdown’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c Rbase64.c -o Rbase64.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from Rbase64.c:1:
In file included from ./Rmarkdown.h:14:
/Library/Frameworks/R.framework/Resources/include/R.h:55:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h> /* Not used by R itself, but widely assumed in packages */
^~~~~~~~~~
1 error generated.
make: *** [Rbase64.o] Error 1
ERROR: compilation failed for package ‘markdown’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/markdown’
Warning in install.packages :
installation of package ‘markdown’ had non-zero exit status
* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./lib/ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c capture.c -o capture.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from capture.c:1:
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:39:11: fatal error: 'stdio.h' file not found
# include <stdio.h>
^~~~~~~~~
1 error generated.
make: *** [capture.o] Error 1
ERROR: compilation failed for package ‘rlang’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rlang’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rlang’
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
* installing *source* package ‘base64enc’ ...
** package ‘base64enc’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c base64.c -o base64.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from base64.c:86:
/Library/Frameworks/R.framework/Resources/include/Rinternals.h:39:11: fatal error: 'stdio.h' file not found
# include <stdio.h>
^~~~~~~~~
1 error generated.
make: *** [base64.o] Error 1
ERROR: compilation failed for package ‘base64enc’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/base64enc’
Warning in install.packages :
installation of package ‘base64enc’ had non-zero exit status
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c api.cpp -o api.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from api.cpp:24:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:29:
In file included from ../inst/include/Rcpp/r/headers.h:67:
In file included from ../inst/include/Rcpp/platform/compiler.h:100:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cmath:305:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found
#include_next <math.h>
^~~~~~~~
1 error generated.
make: *** [api.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
ERROR: dependency ‘markdown’ is not available for package ‘knitr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/knitr’
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘isoband’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/isoband’
Warning in install.packages :
installation of package ‘isoband’ had non-zero exit status
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c altrep-rle.c -o altrep-rle.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from altrep-rle.c:1:
In file included from ./vctrs.h:6:
/Library/Frameworks/R.framework/Resources/include/R.h:55:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h> /* Not used by R itself, but widely assumed in packages */
^~~~~~~~~~
1 error generated.
make: *** [altrep-rle.o] Error 1
ERROR: compilation failed for package ‘vctrs’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/vctrs’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/vctrs’
Warning in install.packages :
installation of package ‘vctrs’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘fs’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/fs’
Warning in install.packages :
installation of package ‘fs’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘lubridate’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/lubridate’
Warning in install.packages :
installation of package ‘lubridate’ had non-zero exit status
ERROR: dependency ‘Rcpp’ is not available for package ‘xml2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/xml2’
Warning in install.packages :
installation of package ‘xml2’ had non-zero exit status
* installing *source* package ‘tidyselect’ ...
** package ‘tidyselect’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘rlang’ 0.4.1 is being loaded, but >= 0.4.3 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘tidyselect’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyselect’
Warning in install.packages :
installation of package ‘tidyselect’ had non-zero exit status
ERROR: dependencies ‘knitr’, ‘base64enc’ are not available for package ‘rmarkdown’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown’
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
ERROR: dependency ‘isoband’ is not available for package ‘ggplot2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
* installing *source* package ‘hms’ ...
** package ‘hms’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘vctrs’ 0.2.0 is being loaded, but >= 0.2.1 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘hms’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/hms’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/hms’
Warning in install.packages :
installation of package ‘hms’ had non-zero exit status
ERROR: dependencies ‘Rcpp’, ‘tidyselect’ are not available for package ‘dplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/dplyr’
Warning in install.packages :
installation of package ‘dplyr’ had non-zero exit status
ERROR: dependencies ‘Rcpp’, ‘tidyselect’ are not available for package ‘haven’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/haven’
Warning in install.packages :
installation of package ‘haven’ had non-zero exit status
ERROR: dependencies ‘fs’, ‘rmarkdown’ are not available for package ‘reprex’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/reprex’
Warning in install.packages :
installation of package ‘reprex’ had non-zero exit status
ERROR: dependencies ‘dplyr’, ‘tidyselect’ are not available for package ‘dbplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/dbplyr’
Warning in install.packages :
installation of package ‘dbplyr’ had non-zero exit status
ERROR: dependencies ‘dplyr’, ‘Rcpp’, ‘tidyselect’ are not available for package ‘tidyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyr’
Warning in install.packages :
installation of package ‘tidyr’ had non-zero exit status
ERROR: dependencies ‘dplyr’, ‘tidyr’ are not available for package ‘broom’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/broom’
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘dplyr’, ‘tidyr’, ‘tidyselect’ are not available for package ‘modelr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/modelr’
Warning in install.packages :
installation of package ‘modelr’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘dbplyr’, ‘dplyr’, ‘ggplot2’, ‘haven’, ‘lubridate’, ‘modelr’, ‘reprex’, ‘tidyr’, ‘xml2’ are not available for package ‘tidyverse’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/y7/cg5_y20s33s9cj5y74v3rzc00000gs/T/RtmpOLLsiu/downloaded_packages’

Problem getting R installed as kernel in Jupyter Notebook

I'm trying to get R installed as a kernel for jupyter notebook. I am follwing the instructions at: https://irkernel.github.io/installation/ but when I try to install IRkernel I get:
also installing the dependency 'uuid'
trying URL 'https://cran.mtu.edu/src/contrib/uuid_0.1-4.tar.gz'
Content type 'application/x-gzip' length 49544 bytes (48 KB)
==================================================
downloaded 48 KB
trying URL 'https://cran.mtu.edu/src/contrib/IRkernel_1.1.tar.gz'
Content type 'application/x-gzip' length 52805 bytes (51 KB)
==================================================
downloaded 51 KB
* installing *source* package 'uuid' ...
** package 'uuid' successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/Rtmpru6fsM/R.INSTALL92f935860c3f/uuid':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package 'uuid'
* removing '/anaconda3/lib/R/library/uuid'
ERROR: dependency 'uuid' is not available for package 'IRkernel'
* removing '/anaconda3/lib/R/library/IRkernel'
The downloaded source packages are in
'/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/Rtmpg79DeD/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("IRkernel") :
installation of package 'uuid' had non-zero exit status
2: In install.packages("IRkernel") :
installation of package 'IRkernel' had non-zero exit status
Can someone please tell me the problem?emphasized text

RMD packages can't be downloaded in R Studio

I can't download the RMD packages in R studio. I tried it by running install.packages("rmarkdown"), and I tried it by File > New File > R Markdown > Download packages.
This is the output:
> install.packages("rmarkdown")
Installing package into ‘C:/Users/Luke/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘glue’, ‘stringi’, ‘knitr’, ‘yaml’, ‘stringr’
There are binary versions available but the source versions are later:
binary source needs_compilation
glue 1.0.0 1.3.1 TRUE
stringi 1.1.5 1.4.3 TRUE
knitr 1.15.1 1.23 FALSE
yaml 2.1.14 2.2.0 TRUE
stringr 1.2.0 1.4.0 FALSE
rmarkdown 1.4 1.13 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/glue_1.0.0.zip'
Content type 'application/zip' length 34947 bytes (34 KB)
downloaded 34 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/stringi_1.1.5.zip'
Content type 'application/zip' length 14220135 bytes (13.6 MB)
downloaded 13.6 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/yaml_2.1.14.zip'
Content type 'application/zip' length 180051 bytes (175 KB)
downloaded 175 KB
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘yaml’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq\downloaded_packages
installing the source packages ‘knitr’, ‘stringr’, ‘rmarkdown’
trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.23.tar.gz'
Content type 'application/x-gzip' length 880134 bytes (859 KB)
downloaded 859 KB
trying URL 'https://cran.rstudio.com/src/contrib/stringr_1.4.0.tar.gz'
Content type 'application/x-gzip' length 135777 bytes (132 KB)
downloaded 132 KB
trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_1.13.tar.gz'
Content type 'application/x-gzip' length 3155180 bytes (3.0 MB)
downloaded 3.0 MB
* installing *source* package 'stringr' ...
** package 'stringr' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'stringi' 1.1.5 is being loaded, but >= 1.1.7 is required
ERROR: lazy loading failed for package 'stringr'
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/stringr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq/downloaded_packages/stringr_1.4.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘stringr’ had non-zero exit status
ERROR: dependency 'stringr' is not available for package 'knitr'
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/knitr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq/downloaded_packages/knitr_1.23.tar.gz' had status 1
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
ERROR: dependencies 'knitr', 'stringr' are not available for package 'rmarkdown'
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/rmarkdown'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq/downloaded_packages/rmarkdown_1.13.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq\downloaded_packages’
The C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq\downloaded_packages folder contains:
Screenshot of named folder
I am very inexperienced with programming in R, so I have no idea what to do with this. I am learning to do it (via the online Udacity course), and for that I need these RMD packages to continue. I hope someone can help me.

Resources