getting error messages when trying to install ggplot2

Im getting all these errors when i try to install ggplot2. Wondering if anyone can help me out. I'm new to all this

Warning: dependencies ‘knitr’, ‘rgeos’, ‘sf’, ‘survival’, ‘latticeExtra’, ‘mvtnorm’ are not available
also installing the dependencies ‘ps’, ‘backports’, ‘prettyunits’, ‘processx’, ‘crosstalk’, ‘xopen’, ‘brew’, ‘commonmark’, ‘ini’, ‘utf8’, ‘lazyeval’, ‘checkmate’, ‘rstudioapi’, ‘zoo’, ‘stringi’, ‘systemfonts’, ‘desc’, ‘pkgbuild’, ‘rprojroot’, ‘callr’, ‘digest’, ‘DT’, ‘git2r’, ‘httr’, ‘jsonlite’, ‘memoise’, ‘rcmdcheck’, ‘remotes’, ‘roxygen2’, ‘rversions’, ‘sessioninfo’, ‘fontBitstreamVera’, ‘fontLiberation’, ‘httpuv’, ‘xtable’, ‘sourcetools’, ‘later’, ‘promises’, ‘fastmap’, ‘clipr’, ‘curl’, ‘fs’, ‘gh’, ‘rematch2’, ‘whisker’, ‘Rcpp’, ‘farver’, ‘lifecycle’, ‘cli’, ‘ellipsis’, ‘fansi’, ‘pillar’, ‘pkgconfig’, ‘vctrs’, ‘rex’, ‘tidyselect’, ‘BH’, ‘plogr’, ‘Formula’, ‘acepack’, ‘gridExtra’, ‘data.table’, ‘htmlTable’, ‘viridis’, ‘htmltools’, ‘base64enc’, ‘sp’, ‘TH.data’, ‘sandwich’, ‘colorspace’, ‘htmlwidgets’, ‘stringr’, ‘SparseM’, ‘MatrixModels’, ‘yaml’, ‘evaluate’, ‘tinytex’, ‘xfun’, ‘gdtools’, ‘pkgload’, ‘devtools’, ‘diffobj’, ‘fontquiver’, ‘freetypeharfbuzz’, ‘purrr’, ‘shiny’, ‘usethis’, ‘xml2’, ‘glue’, ‘gtable’, ‘isoband’, ‘rlang’, ‘scales’, ‘tibble’, ‘withr’, ‘covr’, ‘dplyr’, ‘ggplot2movies’, ‘hexbin’, ‘Hmisc’, ‘mapproj’, ‘maps’, ‘maptools’, ‘multcomp’, ‘munsell’, ‘profvis’, ‘quantreg’, ‘rmarkdown’, ‘svglite’, ‘testthat’, ‘vdiffr’

curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
Error in read.dcf(file = tmpf) : cannot open the connection
In addition: Warning message:
In read.dcf(file = tmpf) :
cannot open compressed file '/var/folders/8n/ffbvfn0j6wx85qnpq14kht5h0000gn/T//RtmpfrzOwk/filef4235de66b', probable reason 'No such file or directory'

This seems like a connectivity issue, R is not being able to connect to the CRAN repository you have selected, these are some things to try.

  • Choose a different CRAN repository, RStudios repository is a good choice (http://cran.rstudio.com/) or you could choose one that is geographically closer to you.
  • Disable secure download setting.
  • Check if your internet connection has traffic restrictions of some kind, like a firewall, proxy server, etc. This is usually the case when you are at work or school.

Thanks so much for your reply. I was already using the RStudio repository it appears. So I guess I could change it. I disabled the secure download method and ran the code again, still getting error messages. Not sure if it is any different:

also installing the dependencies ‘colorspace’, ‘utf8’, ‘Rcpp’, ‘farver’, ‘munsell’, ‘lifecycle’, ‘cli’, ‘ellipsis’, ‘fansi’, ‘pillar’, ‘pkgconfig’, ‘vctrs’, ‘glue’, ‘gtable’, ‘isoband’, ‘rlang’, ‘scales’, ‘tibble’, ‘withr’

curl: (22) The requested URL returned error: 404 Not Found
curl: (22) The requested URL returned error: 404 Not Found
Error in read.dcf(file = tmpf) : cannot open the connection
In addition: Warning message:
In read.dcf(file = tmpf) :
cannot open compressed file '/var/folders/8n/ffbvfn0j6wx85qnpq14kht5h0000gn/T//RtmpfrzOwk/filef421d672110', probable reason 'No such file or directory'

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

changing the repository didnt seem to work. My wi-fi connection is working for me on the internet, and doesn't seem to have restrictions, it's my home network. How do I check that?

@andresrcs do you have any other ideas on this? still haven't found a solution