Open pat-s opened 6 months ago
What is the output of pak::system_r_platform()
?
> pak::system_r_platform()
[1] "x86_64-pc-linux-gnu-rhel-9.3"
Hmmm, I cannot reproduce that:
> options(repos = c(CRAN = "https://packagemanager.posit.co/cran/__linux__/rhel9/2023-10-31"))
> pak::pkg_install("brew?reinstall&nocache")
✔ Updated metadata database: 4.64 MB in 8 files.
✔ Updating metadata database ... done
→ Will install 1 package.
→ Will download 1 package with unknown size.
+ brew 1.0-8 [dl]
ℹ Getting 1 pkg with unknown size
✔ Got brew 1.0-8 (x86_64-pc-linux-gnu-rhel-9.2) (80.37 kB)
✔ Downloaded 1 package (80.37 kB) in 1.1s
✔ Installed brew 1.0-8 (1.1s)
✔ 1 pkg: added 1, dld 1 (80.37 kB) [9s]
> pak::system_r_platform()
[1] "x86_64-pc-linux-gnu-rhel-9.2"
> pak::pak_sitrep()
* pak version:
- 0.7.1
* Version information:
- pak platform: x86_64-pc-linux-musl (current: x86_64-pc-linux-gnu, compatible)
...
I've tracked it down and it seems to be caused by
which does not work in a secured environment which only has whitelistings for packagemanager.posit.co
, cran.r-project.org
and rspm-sync.rstudio.com
.
So what happens if you do this?
curl::curl_fetch_memory("https://cran.r-pkg.org/metadata/src/contrib/METADATA2.gz")
curl::curl_fetch_memory("https://cran.r-pkg.org/metadata/src/contrib/METADATA2.gz")
$url
[1] "https://cran.r-pkg.org/metadata/src/contrib/METADATA2.gz"
$status_code
[1] 403
$type
[1] "text/html"
(Applies to any package,
brew
is just an example)install.packages()
works just fine:pak 0.7.1