OHDSI Home | Forums | Wiki | Github

LegendT2DM// Warning: failed to find binary for 'XXXXX' in package repositories

I posted the same question on github, lets see if anyone would have the same problem (and didnt read the github issue session)


When doing renv::restore() for LegendT2DM >= 1.1.1, we realize there are quite a few warnings:

Warning: failed to find binary for 'Andromeda 0.5.0' in package repositories
Warning: failed to retrieve 'https://mran.microsoft.com/snapshot/2021-07-06/bin/windows/contrib/4.0/Andromeda_0.5.0.zip' [error code 22]
Warning: failed to find source for 'Andromeda 0.5.0' in package repositories
Warning: failed to find binary for 'RSQLite 2.2.7' in package repositories
Warning: failed to retrieve 'https://mran.microsoft.com/snapshot/2021-07-06/bin/windows/contrib/4.0/RSQLite_2.2.7.zip' [error code 22]
Error: failed to retrieve package 'Andromeda@0.5.0'
Warning: failed to find binary for 'blob 1.2.1' in package repositories
Warning: failed to retrieve 'https://mran.microsoft.com/snapshot/2021-07-06/bin/windows/contrib/4.0/blob_1.2.1.zip' [error code 22]
Warning: failed to find binary for 'DBI 1.1.1' in package repositories
Warning: failed to retrieve 'https://mran.microsoft.com/snapshot/2021-07-06/bin/windows/contrib/4.0/DBI_1.1.1.zip' [error code 22]
In addition: There were 30 warnings (use warnings() to see them)

Not sure if we should use a updated package in renv.lock in order to mitigate the errors


i found this kind of errors pretty common.

1 Like

When using renv to install a package,

file.edit('renv/activate.R') can open the correct and desingated activate.R

But when using install and restart, it throws the error

==> Rcmd.exe INSTALL --no-multiarch --with-keep.source LegendT2dm
  Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
Calls: source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file 'renv/activate.R': No such file or directory
Execution halted
   Exited with status 1.

why?

I still have a problem with install and restart over OHDSI packages in R. The error is always

==> Rcmd.exe INSTALL --no-multiarch --with-keep.source LegendT2dm
Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
Calls: source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file 'renv/activate.R': No such file or directory
Execution halted

Exited with status 1.

devtools::check() would also yield the same error in R CMD CHECK

-- R CMD check ---------------------------------------

Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
Calls: source -> withVisible -> eval -> eval -> source -> file
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file 'renv/activate.R': No such file or directory
Execution halted

I realise the project would always load the Rprofile in my docunments instead of the project folder, so it might try to get My Docunments/renv/activate.R instead of [some project folder]/renv/activate.R

I have another computer, where the package would work.

In that computer, Sys.getenv("R_PROFILE_USER") would be []

But in my own computer, the package would not work. And here, Sys.getenv("R_PROFILE_USER") would be C:/Users/user/documents/.Rprofile

How do I unset that or how do I uninstall everything?

Thanks

Hey, did you figure this out? I’m also getting a failed to find binary for 'lubridate 1.9.2' in package repositories error using renv with github actions and can’t figure out how to solve this issue…

t