Failing to install R Packages

Hi, I lost my computer and bought another recently. I have successfully installed R but failed to get packages. I have tried to install packages both in jupyter notebook through anaconda and R studio. I get two kind of messages.

First,

Warning message:
“package ‘tydverse’ is not available (for R version 3.6.1)”

Second, I get a long, long message

also installing the dependencies ‘fs’, ‘processx’, ‘xfun’, ‘blob’, ‘lifecycle’, ‘tidyselect’, ‘vctrs’, ‘glue’, ‘data.table’, ‘gargle’, ‘rematch2’, ‘isoband’, ‘callr’, ‘knitr’, ‘ellipsis’, ‘broom’, ‘dbplyr’, ‘dplyr’, ‘dtplyr’, ‘forcats’, ‘googledrive’, ‘googlesheets4’, ‘ggplot2’, ‘haven’, ‘hms’, ‘jsonlite’, ‘lubridate’, ‘magrittr’, ‘modelr’, ‘pillar’, ‘purrr’, ‘readr’, ‘reprex’, ‘rlang’, ‘rvest’, ‘tibble’, ‘tidyr’, ‘xml2’ Warning message in install.packages("tidyverse"): “installation of package ‘fs’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘processx’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘xfun’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘glue’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘data.table’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘isoband’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘jsonlite’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘lubridate’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘magrittr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘rlang’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘xml2’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘lifecycle’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘gargle’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘callr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘knitr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘ellipsis’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘purrr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘vctrs’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘reprex’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘blob’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘tidyselect’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘hms’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘pillar’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘tibble’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘rematch2’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘dplyr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘forcats’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘googledrive’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘ggplot2’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘readr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘rvest’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘dbplyr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘dtplyr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘googlesheets4’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘haven’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘tidyr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘broom’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘modelr’ had non-zero exit status”Warning message in install.packages("tidyverse"): “installation of package ‘tidyverse’ had non-zero exit status”Updating HTML index of packages in '.Library' Making 'packages.html' ... done

I am not understanding what could be the problem. I use Macbook Pro with M1 processor. I will be grateful for your guidance. I read a lot of online stuff but they were unhelpful.

To help with troubleshooting, please run this code in your R session and post the results here:

sessionInfo()

followed by

getOption("repos")

Since you're on a Mac, you probably also have to install xcode.

Thank you, here is what I get from sessionInfo()

R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS  10.16

Matrix products: default
BLAS/LAPACK: /Users/blanshe/opt/anaconda3/envs/R-learning/lib/R/lib/libRblas.dylib

locale:
[1] C/UTF-8/C/C/C/C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_3.6.1  IRdisplay_0.7.0 pbdZMQ_0.3-3    tools_3.6.1    
 [5] htmltools_0.3.6 base64enc_0.1-3 crayon_1.4.1    Rcpp_1.0.1     
 [9] uuid_0.1-2      IRkernel_0.8.15 jsonlite_1.6    digest_0.6.18  
[13] repr_0.19.2     evaluate_0.13 

And from getOption ("repos"), I get **CRAN:** 'https://cran.r-project.org'

Thank you for the response.

Musinguzi

You misspelled the package name. It should 'tidyverse', not 'tydverse'.

Hi Aephiday25, that you for the response. It still shows me the same error. And the package is not installed.

also installing the dependencies ‘fs’, ‘processx’, ‘xfun’, ‘blob’, ‘lifecycle’, ‘tidyselect’, ‘vctrs’, ‘glue’, ‘data.table’, ‘gargle’, ‘rematch2’, ‘isoband’, ‘ellipsis’, ‘callr’, ‘knitr’, ‘broom’, ‘dbplyr’, ‘dplyr’, ‘dtplyr’, ‘forcats’, ‘googledrive’, ‘googlesheets4’, ‘ggplot2’, ‘haven’, ‘hms’, ‘jsonlite’, ‘lubridate’, ‘magrittr’, ‘modelr’, ‘pillar’, ‘purrr’, ‘readr’, ‘reprex’, ‘rlang’, ‘rvest’, ‘tibble’, ‘tidyr’, ‘xml2’

Warning message in install.packages("tidyverse"):
“installation of package ‘fs’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘processx’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘xfun’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘glue’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘data.table’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘isoband’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘jsonlite’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘lubridate’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘magrittr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘rlang’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘xml2’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘lifecycle’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘gargle’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘ellipsis’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘callr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘knitr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘purrr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘vctrs’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘reprex’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘blob’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘tidyselect’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘hms’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘pillar’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘tibble’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘rematch2’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘dplyr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘forcats’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘googledrive’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘ggplot2’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘readr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘rvest’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘dbplyr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘dtplyr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘googlesheets4’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘haven’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘tidyr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘broom’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘modelr’ had non-zero exit status”Warning message in install.packages("tidyverse"):
“installation of package ‘tidyverse’ had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

It seems you're trying to use anaconda for your R work. Although this ought to work, in practise many people report that managing your R installation with Anaconda leads to problems.

I suggest you install R directly from CRAN, without using Anaconda, and then use the standard install.packages() for package installation:

install.packages("tidyverse")

However, if you want to continue using Anaconda, then you should use Anaconda tools to install your packages:

conda install -c r r-tidyverse

Thank you Andrie, I have done as you advised. Removed anaconda and downloaded Rstudio directly from CRAN and packages installed instantly. But the final question; why is it that R is not working well with Anaconda. I love jupyter notebook and I wanted to be writing my R codes in it.

Thank you once again.

You can still use Jupyter notebook with either Anaconda R or R from CRAN.

The point is that if you plan to use Anaconda R, you should use Anaconda tools for managing packages.

However, I suggest you use CRAN R with your Jupyter notebook, and use standard R tooling to manage your packages.

Thank you :pray:. I understand .

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.