‘magrittr’ 403 Forbiddened and unable to be installed

131 Views Asked by At

I am having a problem with downloading the magrittr package from CRAN. Initially it seem like my company is blocking me from downloading the zip file. I jump through hoops and obtained a high level internet access, also tried a few simple fixes, but the issue persists. I am able to download other packages from CRAN, but magrittr just seem to be deemed unsafe and getting 403ed no matter what I tried.

Also magrittr seem to be one of the core packages that is required by lots of package, so life is very hard without it.

> options(download.file.method = "wininet")

> install.packages("magrittr")
Warning in install.packages :
  the 'wininet' method is deprecated for http:// and https:// URLs
trying URL 'http://cran.rstudio.com/bin/windows/contrib/4.3/magrittr_2.0.3.zip'
Warning in install.packages :
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/4.3/magrittr_2.0.3.zip': HTTP status was '403 Forbidden'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/4.3/magrittr_2.0.3.zip'
Warning in install.packages :
  download of package ‘magrittr’ failed
> devtools::install_github("rstudio/rmarkdown")
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘magrittr’
> install.packages("cran.r-project.org/src/contrib/Archive/magrittr/…", repos = NULL, type="source")
Warning: invalid package 'cran.r-project.org/src/contrib/Archive/magrittr/…'
Error: ERROR: no packages specified
Warning in install.packages :
  installation of package ‘cran.r-project.org/src/contrib/Archive/magrittr/…’ had non-zero exit status
[1] "R version 4.3.1 (2023-06-16 ucrt)"

I have unticked the "Use secure method for https download" option in Options.

I have set my download method with options(download.file.method = "wininet")

I have tried changing Global repository to other ones.

I also tried to installing an archived version.

From cybersecurity side they can see that the magrittr zip URL is blocked by Zscaler. But other package's zip URL is not blocked.

install.packages("installr")
Warning in install.packages :
  the 'wininet' method is deprecated for http:// and https:// URLs
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.3/installr_0.23.4.zip'
Content type 'application/zip' length 348583 bytes (340 KB)
downloaded 340 KB

package ‘installr’ successfully unpacked and MD5 sums checked
0

There are 0 best solutions below