I need to test a program using rjags version 4.10. I have JAGS 4.3.0 installed which was the latest version when rjags 4.10 was released. I am trying to install it but am getting the following error. What can I do to fix this?
> require(devtools)
Loading required package: devtools
Loading required package: usethis
> install_version("rjags", version = "4.10", repos = "http://cran.us.r-project.org")
Downloading package from url: http://cran.us.r-project.org/src/contrib/Archive/rjags/rjags_4-10.tar.gz
Installing package into ‘C:/Users/pakalla/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
* installing *source* package 'rjags' ...
** package 'rjags' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I""/c/progra~1/JAGS/JAGS-4.3.0"/include" -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I""/c/progra~1/JAGS/JAGS-4.3.0"/include" -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -D_GLIBCXX_USE_CXX11_ABI=0 -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c jags.cc -o jags.o
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I""/c/progra~1/JAGS/JAGS-4.3.0"/include" -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -D_GLIBCXX_USE_CXX11_ABI=0 -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c parallel.cc -o parallel.o
g++ -std=gnu++11 -shared -s -static-libgcc -o rjags.dll tmp.def init.o jags.o parallel.o -L/c/progra~1/JAGS/JAGS-4.3.0//x64/bin -ljags-4 -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-42~1.1/bin/x64 -lR
installing to C:/Users/pakalla/AppData/Local/R/win-library/4.2/00LOCK-rjags/00new/rjags/libs/x64
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
ERROR: installing package indices failed
* removing 'C:/Users/pakalla/AppData/Local/R/win-library/4.2/rjags'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/pakalla/AppData/Local/Temp/RtmpsH5lLJ/remotes2cc6dfe312e/rjags’ had non-zero exit status
I was able to install this old package version once I had installed an older version of R (4.1.3) and an older version of RTools (40).