hrue / r-inla

This is the public repository for the r-inla project
GNU General Public License v2.0
82 stars 24 forks source link

Facing issue in installing INLA on windows #83

Closed Rohit-Satyam closed 1 year ago

Rohit-Satyam commented 1 year ago

Hi have tried all the ways to install INLA on windows but they all ends with an error (R version 4.3.1). They are given below

> remotes::install_version("INLA", version="23.05.30",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/testing"), dep=TRUE)
Trying https://cran.rstudio.com/
Trying https://inla.r-inla-download.org/R/testing
Error in download_version_url(package, version, repos, type) : 
  version '23.05.30' is invalid for package 'INLA'
> install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)
Installing package into ‘C:/Users/rohit_satyam/AppData/Local/R/win-library/4.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://inla.r-inla-download.org/R/stable/bin/windows/contrib/4.3:
  cannot open URL 'https://inla.r-inla-download.org/R/stable/bin/windows/contrib/4.3/PACKAGES'
installing the source package ‘INLA’

trying URL 'https://inla.r-inla-download.org/R/stable/src/contrib/INLA_23.04.24.tar.gz'
Content type 'application/x-gzip' length 91038966 bytes (86.8 MB)
downloaded 86.8 MB

* installing *binary* package 'INLA' ...
cp: unknown option -- )
Try '/usr/bin/cp --help' for more information.
ERROR: installing binary package failed
* removing 'C:/Users/rohit_satyam/AppData/Local/R/win-library/4.3/INLA'
Warning in install.packages :
  installation of package ‘INLA’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\rohit_satyam\AppData\Local\Temp\RtmpMjBXnX\downloaded_packages’
finnlindgren commented 1 year ago

You're asking for a specific version from the testing repository that doesnt exist. If you really need an old version, the closest to 23.05.30 is 23.05.30-1 (found by browsing the windows folders on the download site). If you don't need a specific version, just use the testing repo without version specification.

Rohit-Satyam commented 1 year ago

Yes the testing repo works but the stable release fails repeatedly. I will close this issue for now.

finnlindgren commented 1 year ago

The reason it failed on stable is you were asking for a specific version, and that specific version does not exist. If you really needed to, you could still use the stable repo if you didn't specify a non-existent version from it. (But using the testing repo instead is usually better whenever possible.)