I am trying to build my R package using RStudio with roxygen2. It runs through all the code fine (there is C++ code for which I am using Rcpp and there is nothing out of the ordinary during compilation either) but once it finishes going through the documentation
heavily truncated...
...
Writing NAMESPACE
it stops with the error:
Exited with status -1073741819
I have tried using devtools directly where devtools::document() completes without a problem but devtools::install() errors out with the unhelpful output
ERROR: loading failed
* removing 'C:/Users/.../Documents/R/R-3.3.0/library/gpuR'
* restoring previous 'C:/Users/.../Documents/R/R-3.3.0/library/gpuR'
Error: Command failed (1)
I cannot find any information online regarding what this exit error above could mean. Any insights?
Edit
devtools::build() also fails with the following error:
ERROR: loading failed
* removing 'C:/Users/...~1/AppData/Local/Temp/RtmpqG7nZV/Rinst84a432724f12/gpuR'
-----------------------------------
ERROR: package installation failed
Error: Command failed (1)
Related
I'm having an issue getting rjags to load & run. I can install rjags, but it doesn't run because it can't find JAGS. My versions are listed below and are all updated to the latest versions. I'm also using a Thinkpad.
JAGS Version: 4.3.0
RStudio Version: 2021.09.0 Build 351
Installation of rjags is okay using the following command:
install.packages('rjags',configure.args="--enable-rpath")
Error messages recopied below:
library(rjags)
Warning: package ‘rjags’ was built under R version 4.0.5
Error: package or namespace load failed for ‘rjags’:
.onLoad failed in loadNamespace() for 'rjags', details:
call: fun(libname, pkgname)
error: The environment variable JAGS_HOME is set to
C:/ProgramData/Microsoft/Windows/Start Menu/Programs/JAGS/JAGS-4.3.0
but no JAGS installation can be found there
If I go to where JAGS is installed, the path is:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\JAGS
I used the above lines shared to try and solve this problem, but to no avail:
Sys.setenv(JAGS_HOME="C:/ProgramData/Microsoft/Windows/Start Menu/Programs/JAGS/JAGS-4.3.0")
Error: unexpected '/' in "Sys.setenv(JAGS_HOME=C:/"
Corrected to:
Sys.setenv(JAGS_HOME="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\JAGS\JAGS-4.3.0")
Error: '\P' is an unrecognized escape in character string starting ""C:\P"
Corrected to:
Sys.setenv(JAGS_HOME="C:\ ProgramData\ Microsoft\ Windows\ Start Menu\ Programs\ JAGS\ JAGS-4.3.0")
This doesn't yield any errors, but when I try to load rjags I get the following:
library(rjags)
Warning: package ‘rjags’ was built under R version 4.0.5
Error: package or namespace load failed for ‘rjags’:
.onLoad failed in loadNamespace() for 'rjags', details:
call: fun(libname, pkgname)
error: The environment variable JAGS_HOME is set to
C: ProgramData Microsoft Windows Start Menu Programs JAGS JAGS-4.3.0
but no JAGS installation can be found there
This is the same as above, but the / are left out for some reason.
Unsure of what to try next, any thoughts/insight would be much appreciated! :)
This seems to be an issue others have faced too: rjags failed to load and R Failed to locate any version of JAGS
https://sourceforge.net/p/mcmc-jags/discussion/610037/thread/060fd5c378/?limit=25
https://www.reddit.com/r/rstats/comments/pzto5t/rjags_is_my_enemy/
Though none of these solutions seem to be working (yet?).
Problem solved!
Both of you were right - JAGS was in an odd location, so I moved it to:
C:\Program Files\JAGS\JAGS-4.3.0
And then used the code (I think / is the same as \):
Sys.setenv(JAGS_HOME="C:/Program Files/JAGS/JAGS-4.3.0")
And now it works like a charm :)
I'm trying to install the package 'microdadosBrasil' but I am with some problems. After the install.packages("remotes")
remotes::install_github("lucasmation/microdadosBrasil")
The program asks me to update de version and here commes the error:
It is recommended to update all of them.
Which would you like to update?
1: All
2: CRAN packages only
3: None
4: Rcpp (1.0.4 -> 1.0.4.6) [CRAN]
Enter one or more numbers, or an empty line to skip updates:
1
...
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'microdadosBrasil' in library.dynam(lib, package, package.lib):
DLL 'datatable' not found: maybe not installed for this architecture?
Erro: loading failed
Execução interrompida
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/Usuario/OneDrive/Documentos/R/win-library/3.6/microdadosBrasil'
Erro: Failed to install 'microdadosBrasil' from GitHub:
(convertido do aviso) installation of package ‘C:/Users/Usuario/AppData/Local/Temp/RtmpOO4bHT/file3a0479d3ee9/microdadosBrasil_0.0.0.9000.tar.gz’ had non-zero exit status
I have had that error on a few occasions. Usually using manually installing the package that R is stumbling over is sufficient to get past that point.
So I would try install.packages('i386') and if you get an error on that package, it may be informative. Often they are tied to underlying language interpreters or some kind of application you need installed.
If you see that error on the dependency keep drilling down until you find the root cause of the failure. Once you get that package or underlying language or application installed, you can work your way back up and all will be right in the world.
My package builds on Linux are failing with the following compilation error for rstan package:
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [rstan.so] Error 1
ERROR: compilation failed for package ‘rstan’
How can I modify my travis.yaml to successfully install rstan on Travis?
Build log:
https://travis-ci.org/IndrajeetPatil/statsExpressions/builds/638404778?utm_source=github_status&utm_medium=notification
Travis yaml:
https://github.com/IndrajeetPatil/statsExpressions/blob/master/.travis.yml
After trying out many many different permutations and combinations, I finally got Travis builds to succeed, not only by compiling rstan properly but also installing other packages that need compilation so that the log doesn't exceed maximum limit or time out.
Here is the new yaml file for anyone who may run into a similar issue in the future:
https://github.com/IndrajeetPatil/statsExpressions/blob/master/.travis.yml
I'm attempting to deploy my shiny app to shinyapps.io but I'm getting a build error for gWidgetstcltk (0.0-55). gWidgets is a dependency for one of the packages I use in my app. However, I only use a few functions from this package that don't require gWidgets.
I tried deploying on Windows and Ubuntu with no success. I tried installing TK8.5 (required for gWidgetstcltk) but this did not help any. Ideally if there was a way I can force the app to build without this dependency the app should still work. Alternatively, is there a way I could remove this dependency from the package itself?
Error message:
Warning: no DISPLAY variable so Tk is not available
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
[tcl] invalid command name "font".
Error : unable to load R code in package ‘gWidgetstcltk’
ERROR: lazy loading failed for package ‘gWidgetstcltk’
* removing ‘/opt/R/3.4.4/lib/R/library/gWidgetstcltk’
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 643000037 failed: Error building image: Error building gWidgetstcltk (0.0-55). Build exited with non-zero status: 1
I am working on Bayesian inference and I want to install bayesVAR_TVP package from Github. I tried the following commands:
install.packages("devtools")
library(devtools)
install_github("GediminasB/bayesVAR_TVP")
and
install.packages("githubinstall")
gh_install_packages("bayesVAR_TVP")
In both case I received the following error:
Error: package or namespace load failed for 'bayesVARTVP' in library.dynam(lib, package, package.lib):
DLL 'bayesVAR' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
Error: package or namespace load failed for 'bayesVARTVP' in library.dynam(lib, package, package.lib):
DLL 'bayesVAR' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing 'C:/Users/Hamed/Documents/R/win-library/3.4/bayesVARTVP'
In R CMD INSTALL
Installation failed: Command failed (1)
I have checked some similar questions on this site but they could not help me. I am working on a Win 7 64b and R 3.4.3. Also, my friend has a similar error on mac system. Does anyone have any idea? Thanks beforehand.