r-inla
r-inla copied to clipboard
Cannot build INLA from source on Windows
If we try and build INLA from source, we get the error message below:-
> install.packages("INLA",
repos = c(getOption("repos"),
INLA = "https://inla.r-inla-download.org/R/stable"),
type = "source",
dep = TRUE)
Installing package into ‘C:/Users/wrh1/Documents/R/win-library/4.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependencies ‘Rgraphviz’, ‘graph’ are not available
trying URL 'https://inla.r-inla-download.org/R/stable/src/contrib/INLA_24.05.10.tar.gz'
Content type 'application/x-gzip' length 61448956 bytes (58.6 MB)
downloaded 58.6 MB
* installing *binary* package 'INLA' ...
C:\Windows\cp.exe: invalid option -- )
Try `C:\Windows\cp.exe --help' for more information.
ERROR: installing binary package failed
* removing 'C:/Users/wrh1/Documents/R/win-library/4.4/INLA'
* restoring previous 'C:/Users/wrh1/Documents/R/win-library/4.4/INLA'
Warning in install.packages :
installation of package ‘INLA’ had non-zero exit status
This is easy to work around with R 4.4 - just don't build from source, and the binary gets downloaded - if the ready-build version is available. But for users still on R 4.3, there is no matching binary of 24.05.10 in https://inla.r-inla-download.org/R/stable/bin/windows/contrib/4.3/
, so install.packages tries to build 24.05.10 from source. They have to either upgrade to R 4.4, or specify version 24.05.01-1 manually, because there's a binary for that.
So the workarounds are not hard, but is seems there's a problem in the source version for building at the moment.