I am still able to install binary packages from P3M using install.packages() but I'm getting this error when running devtools::check(). I've included some of my related settings below the check() results. I get the same error when running devtools::check() in base R and in Rstudio.
Error in output from devtools::check():
β checking package namespace information
β checking package dependencies ...Warning in url(sprintf("%s/%s", cran, path), open = "rb") : (3s)
cannot open URL 'https://packagemanager.posit.co/cran/__linux__/jammy/latest/web/packages/packages.rds': HTTP status was '404 Not Found'
Error in url(sprintf("%s/%s", cran, path), open = "rb") :
cannot open the connection to 'https://packagemanager.posit.co/cran/__linux__/jammy/latest/web/packages/packages.rds'
Execution halted
> getOption('HTTPUserAgent')
[1] "R/4.3.0 R (4.3.0 x86_64-pc-linux-gnu x86_64 linux-gnu)"
I cannot reproduce this. The quoted URL does indeed produce a 404, but it is not requested in my tests. Does this happen with any R package or only specific ones? Can you provide the output of sessioninfo::session_info() or sessionInfo()?
Same error using a different package, here a git clone of tidyverse/magrittr:
R version 4.3.0 (2023-04-21) -- "Already Tomorrow"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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.
> devtools::check()
ββ Documenting βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βΉ Installed roxygen2 version (7.2.3) doesn't match required (7.1.2)
β `check()` will not re-document this package
ββ Building ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Setting env vars:
β’ CFLAGS : -Wall -pedantic -fdiagnostics-color=always
β’ CXXFLAGS : -Wall -pedantic -fdiagnostics-color=always
β’ CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
β’ CXX14FLAGS: -Wall -pedantic -fdiagnostics-color=always
β’ CXX17FLAGS: -Wall -pedantic -fdiagnostics-color=always
β’ CXX20FLAGS: -Wall -pedantic -fdiagnostics-color=always
ββ R CMD build βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β checking for file β/home/dave/Desktop/magrittr/DESCRIPTIONβ ...
β preparing βmagrittrβ:
β checking DESCRIPTION meta-information ...
β cleaning src
β installing the package to build vignettes
β creating vignettes (4.4s)
β cleaning src
β checking for LF line-endings in source and make files and shell scripts
β checking for empty or unneeded directories
β building βmagrittr_2.0.3.9000.tar.gzβ
ββ Checking ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Setting env vars:
β’ _R_CHECK_CRAN_INCOMING_USE_ASPELL_ : TRUE
β’ _R_CHECK_CRAN_INCOMING_REMOTE_ : FALSE
β’ _R_CHECK_CRAN_INCOMING_ : FALSE
β’ _R_CHECK_FORCE_SUGGESTS_ : FALSE
β’ _R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_: FALSE
β’ NOT_CRAN : true
ββ R CMD check βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β using log directory β/tmp/RtmpV0XWT5/file4e1c31d7c9f9/magrittr.Rcheckβ
β using R version 4.3.0 (2023-04-21)
β using platform: x86_64-pc-linux-gnu (64-bit)
β R was compiled by
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
GNU Fortran (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
β running under: Linux Mint 21.1
β using session charset: UTF-8
β using options β--no-manual --as-cranβ
β checking for file βmagrittr/DESCRIPTIONβ
β checking extension type ... Package
β this is package βmagrittrβ version β2.0.3.9000β
β package encoding: UTF-8
β checking package namespace information
β checking package dependencies ...Warning in url(sprintf("%s/%s", cran, path), open = "rb") : (2.8s)
cannot open URL 'https://packagemanager.posit.co/cran/__linux__/jammy/latest/web/packages/packages.rds': HTTP status was '404 Not Found'
Error in url(sprintf("%s/%s", cran, path), open = "rb") :
cannot open the connection to 'https://packagemanager.posit.co/cran/__linux__/jammy/latest/web/packages/packages.rds'
Execution halted
ββ R CMD check results ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ magrittr 2.0.3.9000 ββββ
Duration: 3.8s
0 errors β | 0 warnings β | 0 notes β
Thanks much for any suggestions on debugging this issue. I'm getting the same error when I try checking a different package inside a singularity container based on rocker/geospatial:4.2.3, so I don't think it's specific to R 4.3.0 or to Linux Mint.
My reply got spam-filtered by Akismet and may show back up eventually, but briefly yes ,this same error does occur with other packages (tested it also using tidyverse/magrittr). I also get the error when I attempt this inside a rocker/geospatial:4.2.3 container, so I don't think it's Linux Mint or R 4.3.0 specific. See the OP for sessionInfo() output.
I see that the same error is also mentioned on this rocker webpage, see section 4.1:
I'm not sure if this is best seen as a bug or not, but it appears that binary package installs through P3M are not compatible with a devtools:check() development workflow.
The workaround given in the rocker issue, changing the repo to a traditional source CRAN url, does work in my case, but of course might be nicer if no workaround was needed.
dave@dave-linux-macbook:~/Desktop$ R CMD check magrittr_2.0.3.9000.tar.gz
* using log directory β/home/dave/Desktop/magrittr.Rcheckβ
* using R version 4.3.0 (2023-04-21)
* using platform: x86_64-pc-linux-gnu (64-bit)
* R was compiled by
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
GNU Fortran (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
* running under: Linux Mint 21.1
* using session charset: UTF-8
* checking for file βmagrittr/DESCRIPTIONβ ... OK
* checking extension type ... Package
* this is package βmagrittrβ version β2.0.3.9000β
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
Internally, the check functions in R explicitly searches for "CRAN", so https://cloud.r-project.org is used to retrieve the file in question. However, normal calls to install.packages() go through the repository list one by one and use the first one that has the package available, which will be the binary packages from package manager.
I will ask internally if there is a possibility to also provide the web part of CRAN via package manager.