cannot install packages with renv

I have a question that is very similar to this post, but with slightly different conditions

I'm running R version 4.1.0 on ubuntu 24.04

I can install packages normally with for instance

install.packages("here")

However when I initialize an renv

renv::init()
install.packages("here")

I get the following error

> Error: package 'here' is not available
> In addition: Warning message:
> could not retrieve available packages for url 'https://cloud.r-project.org/src/contrib' 
> Traceback (most recent calls last):
> 8: install.packages("here")
> 7: install(pkgs)
> 6: retrieve(names(remotes))
> 5: handler(package, renv_retrieve_impl(package))
> 4: renv_retrieve_impl(package)
> 3: renv_available_packages_latest(package)
> 2: stopf("package '%s' is not available", package)
> 1: stop(sprintf(fmt, ...), call. = call.)
> > restore(repos="https://cloud.r-project.org")
> Error in restore(repos = "https://cloud.r-project.org") : 
>   could not find function "restore"
> > renv::version()
> Error: 'version' is not an exported object from 'namespace:renv'

utils::install.packages()works directly

renv::diagnostics() returns

renv::diagnostics()

> Diagnostics Report [renv 0.16.0]
> ================================
> 
> # Session Info =======================
> R version 4.1.3 (2022-03-10)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 24.04 LTS
> 
> Matrix products: default
> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so
> 
> locale:
>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
> 
> attached base packages:
> [1] stats     graphics  grDevices datasets  utils     methods   base     
> 
> loaded via a namespace (and not attached):
> [1] compiler_4.1.3 tools_4.1.3    renv_0.16.0   
> 
> # Project ============================
> Project path: "~/Projects/TestInstall2024May"
> 
> # Status =============================
> * The project is already synchronized with the lockfile.
> 
> # Packages ===========================
>            Library Source Lockfile Source Path Dependency
> KernSmooth 2.23-20   CRAN     <NA>   <NA>  [2]       <NA>
> MASS        7.3-55   CRAN     <NA>   <NA>  [2]       <NA>
> Matrix       1.4-0   CRAN     <NA>   <NA>  [2]       <NA>
> boot        1.3-28   CRAN     <NA>   <NA>  [2]       <NA>
> class       7.3-20   CRAN     <NA>   <NA>  [2]       <NA>
> cluster      2.1.2   CRAN     <NA>   <NA>  [2]       <NA>
> codetools   0.2-18   CRAN     <NA>   <NA>  [2]       <NA>
> foreign     0.8-82   CRAN     <NA>   <NA>  [2]       <NA>
> lattice    0.20-45   CRAN     <NA>   <NA>  [2]       <NA>
> mgcv        1.8-39   CRAN     <NA>   <NA>  [2]       <NA>
> nlme       3.1-155   CRAN     <NA>   <NA>  [2]       <NA>
> nnet        7.3-17   CRAN     <NA>   <NA>  [2]       <NA>
> renv        0.16.0   CRAN   0.16.0   CRAN  [1]     direct
> rpart       4.1.16   CRAN     <NA>   <NA>  [2]       <NA>
> spatial     7.3-15   CRAN     <NA>   <NA>  [2]       <NA>
> survival    3.2-13   CRAN     <NA>   <NA>  [2]       <NA>
> utils         <NA>   <NA>     <NA>   <NA>  [2]   indirect
> 
> [1]: /home/jacob/Projects/TestInstall2024May/renv/library/R-4.1/x86_64-pc-linux-gnu         
> [2]: /home/jacob/Projects/TestInstall2024May/renv/sandbox/R-4.1/x86_64-pc-linux-gnu/dbd573bd
> 
> # ABI ================================
> * No ABI conflicts were detected in the set of installed packages.
> 
> # User Profile =======================
> [no user profile detected]
> 
> # Settings ===========================
> List of 10
>  $ bioconductor.version     : chr(0) 
>  $ external.libraries       : chr(0) 
>  $ ignored.packages         : chr(0) 
>  $ package.dependency.fields: chr [1:3] "Imports" "Depends" "LinkingTo"
>  $ r.version                : chr(0) 
>  $ snapshot.type            : chr "implicit"
>  $ use.cache                : logi TRUE
>  $ vcs.ignore.cellar        : logi TRUE
>  $ vcs.ignore.library       : logi TRUE
>  $ vcs.ignore.local         : logi TRUE
> 
> # Options ============================
> List of 9
>  $ defaultPackages                     : chr [1:6] "datasets" "utils" "grDevices" "graphics" ...
>  $ download.file.method                : NULL
>  $ download.file.extra                 : NULL
>  $ install.packages.compile.from.source: NULL
>  $ pkgType                             : chr "source"
>  $ repos                               : Named chr "https://cloud.r-project.org"
>   ..- attr(*, "names")= chr "CRAN"
>  $ renv.consent                        : logi TRUE
>  $ renv.project.path                   : chr "/home/jacob/Projects/TestInstall2024May"
>  $ renv.verbose                        : logi TRUE
> 
> # Environment Variables ==============
> HOME                        = /home/jacob
> LANG                        = en_US.UTF-8
> MAKE                        = make
> R_LIBS                      = <NA>
> R_LIBS_SITE                 = 
> R_LIBS_USER                 = /home/jacob/Projects/TestInstall2024May/renv/library/R-4.1/x86_64-pc-linux-gnu:/home/jacob/Projects/TestInstall2024May/renv/sandbox/R-4.1/x86_64-pc-linux-gnu/dbd573bd
> RENV_DEFAULT_R_ENVIRON      = <NA>
> RENV_DEFAULT_R_ENVIRON_USER = <NA>
> RENV_DEFAULT_R_LIBS         = <NA>
> RENV_DEFAULT_R_LIBS_SITE    = 
> RENV_DEFAULT_R_LIBS_USER    = ~/R/x86_64-pc-linux-gnu-library/4.1
> RENV_DEFAULT_R_PROFILE      = <NA>
> RENV_DEFAULT_R_PROFILE_USER = <NA>
> RENV_PROJECT                = /home/jacob/Projects/TestInstall2024May
> 
> # PATH ===============================
> - /home/jacob/bin
> - /usr/local/sbin
> - /usr/local/bin
> - /usr/sbin
> - /usr/bin
> - /sbin
> - /bin
> - /usr/games
> - /usr/local/games
> - /snap/bin
> - /snap/bin
> 
> # Cache ==============================
> There are a total of 0 package(s) installed in the renv cache.
> Cache path: "~/.cache/R/renv/cache/v5/R-4.1/x86_64-pc-linux-gnu"
getOption("repos")
>                          CRAN 
> "https://cloud.r-project.org"

Here's where things get a bit strange

getOption("download.file.method") returns

>NULL
renv:::renv_download_file_method()
>Error: object 'renv_download_file_method' not found

Setting Sys.setenv(RENV_DOWNLOAD_FILE_METHOD = "libcurl") has absolutely no effect

Runiing any of the following
options(renv.download.override = utils::download.file)
activating R,
restarting R
reinstalling renv with its dependencies using
utils::install.packages("renv", dependencies = TRUE)
using renv::install()

I'm out of ideas. Can anyone advise me how to get things up and running? I'm happy to post this somewhere else, like the renv github if this is the wrong place.

Additionally, if I update R renv::diagnostics() reads

renv::diagnostics()
Diagnostics Report [renv 1.0.7]
===============================

> # Session Info ---------------------------------------------------------------
> R version 4.1.3 (2022-03-10)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 24.04 LTS
> 
> Matrix products: default
> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so
> 
> locale:
>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
> 
> attached base packages:
> [1] stats     graphics  grDevices datasets  utils     methods   base     
> 
> loaded via a namespace (and not attached):
> [1] compiler_4.1.3 tools_4.1.3    renv_1.0.7    
> 
> # Project --------------------------------------------------------------------
> Project path: "~/Projects/TestInstall2024May"
> 
> # Status ---------------------------------------------------------------------
> No issues found -- the project is in a consistent state.
> 
> # Packages -------------------------------------------------------------------
>            Library Source Lockfile Source Path Dependency
> KernSmooth 2.23-20   CRAN     <NA>   <NA>  [2]       <NA>
> MASS        7.3-55   CRAN     <NA>   <NA>  [2]       <NA>
> Matrix       1.4-0   CRAN     <NA>   <NA>  [2]       <NA>
> boot        1.3-28   CRAN     <NA>   <NA>  [2]       <NA>
> class       7.3-20   CRAN     <NA>   <NA>  [2]       <NA>
> cluster      2.1.2   CRAN     <NA>   <NA>  [2]       <NA>
> codetools   0.2-18   CRAN     <NA>   <NA>  [2]       <NA>
> foreign     0.8-82   CRAN     <NA>   <NA>  [2]       <NA>
> lattice    0.20-45   CRAN     <NA>   <NA>  [2]       <NA>
> mgcv        1.8-39   CRAN     <NA>   <NA>  [2]       <NA>
> nlme       3.1-155   CRAN     <NA>   <NA>  [2]       <NA>
> nnet        7.3-17   CRAN     <NA>   <NA>  [2]       <NA>
> renv         1.0.7   CRAN    1.0.7   CRAN  [1]     direct
> rpart       4.1.16   CRAN     <NA>   <NA>  [2]       <NA>
> spatial     7.3-15   CRAN     <NA>   <NA>  [2]       <NA>
> survival    3.2-13   CRAN     <NA>   <NA>  [2]       <NA>
> utils         <NA>   <NA>     <NA>   <NA>  [2]   indirect
> 
> [1]: /home/jacob/Projects/TestInstall2024May/renv/library/R-4.1/x86_64-pc-linux-gnu
> [2]: /home/jacob/.cache/R/renv/sandbox/R-4.1/x86_64-pc-linux-gnu/dbd573bd          
> 
> # ABI ------------------------------------------------------------------------
> - No ABI problems were detected in the set of installed packages.
> 
> # User Profile ---------------------------------------------------------------
> [no user profile detected]
> 
> # Settings -------------------------------------------------------------------
> List of 13
>  $ bioconductor.version     : NULL
>  $ external.libraries       : chr(0) 
>  $ ignored.packages         : chr(0) 
>  $ package.dependency.fields: chr [1:3] "Imports" "Depends" "LinkingTo"
>  $ ppm.enabled              : NULL
>  $ ppm.ignored.urls         : chr(0) 
>  $ r.version                : NULL
>  $ snapshot.type            : chr "implicit"
>  $ use.cache                : logi TRUE
>  $ vcs.ignore.cellar        : logi TRUE
>  $ vcs.ignore.library       : logi TRUE
>  $ vcs.ignore.local         : logi TRUE
>  $ vcs.manage.ignores       : logi TRUE
> 
> # Options --------------------------------------------------------------------
> List of 8
>  $ defaultPackages                     : chr [1:6] "datasets" "utils" "grDevices" "graphics" ...
>  $ download.file.method                : NULL
>  $ download.file.extra                 : NULL
>  $ install.packages.compile.from.source: NULL
>  $ pkgType                             : chr "source"
>  $ repos                               : Named chr "https://packagemanager.posit.co/cran/__linux__/noble/latest"
>   ..- attr(*, "names")= chr "CRAN"
>  $ renv.consent                        : logi TRUE
>  $ renv.verbose                        : logi TRUE
> 
> # Environment Variables ------------------------------------------------------
> HOME                        = /home/jacob
> LANG                        = en_US.UTF-8
> MAKE                        = make
> R_LIBS                      = <NA>
> R_LIBS_SITE                 = 
> R_LIBS_USER                 = /home/jacob/Projects/TestInstall2024May/renv/library/R-4.1/x86_64-pc-linux-gnu
> RENV_DEFAULT_R_ENVIRON      = <NA>
> RENV_DEFAULT_R_ENVIRON_USER = <NA>
> RENV_DEFAULT_R_LIBS         = <NA>
> RENV_DEFAULT_R_LIBS_SITE    = 
> RENV_DEFAULT_R_LIBS_USER    = ~/R/x86_64-pc-linux-gnu-library/4.1
> RENV_DEFAULT_R_PROFILE      = <NA>
> RENV_DEFAULT_R_PROFILE_USER = <NA>
> RENV_PROJECT                = /home/jacob/Projects/TestInstall2024May
> 
> # PATH -----------------------------------------------------------------------
> - /home/jacob/bin
> - /usr/local/sbin
> - /usr/local/bin
> - /usr/sbin
> - /usr/bin
> - /sbin
> - /bin
> - /usr/games
> - /usr/local/games
> - /snap/bin
> - /snap/bin
> 
> # Cache ----------------------------------------------------------------------
> There are a total of 0 packages installed in the renv cache.
> Cache path: "~/.cache/R/renv/cache/v5/R-4.1/x86_64-pc-linux-gnu"

However, the problems persist as above.

The one difference is that getOption("repos") returns

>                                                          CRAN 
> "https://packagemanager.posit.co/cran/__linux__/noble/latest"

But renv:::renv_download_file_method() still returns method not found.
`