0

I am trying to build a package which has the namespace files as follows:

exportPattern("^[[:alpha:]]+")

importFrom(rClr, clrLoadAssembly)

rClr is installed in my system. I build my package using devtools::build and it successfully builds.

When I install the package using the following command install.packages("C:/Package/Utils_0.1.0.tar.gz", repos = NULL, type = "source")

I get the following error:

* installing *source* package 'Utils' ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : .onLoad failed in loadNamespace() for 'rClr', details:
  call: fun(libname, pkgname)
  error: 'msvcr120.dll' was not found on this Windows system.
You are probably missing the Visual C++ Redistributable for Visual Studio 2013.
Check instructions at https://r2clr.codeplex.com/wikipage?title=Installing%20R%20packages&referringTitle=Documentation
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'
* removing 'C:/Users/S.Bista/Documents/R/R-3.3.2/library/Utils'
* restoring previous 'C:/Users/S.Bista/Documents/R/R-3.3.2/library/Utils'
Warning in install.packages :
  running command '"C:/Users/S~1.BIS/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\S.Bista\Documents\R\R-3.3.2\library" "C:/Package/Utils_0.1.0.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘C:/Package/Utils_0.1.0.tar.gz’ had non-zero exit status

Loading fails for i386 but I have x64 system.

SBista
  • 7,479
  • 1
  • 27
  • 58
  • Are you by any chance missing the Visual C++ Redistributable for Visual Studio 2013? :) – Tim Goodman Apr 05 '17 at 10:19
  • @TimGoodman I have Visual C++ Redistributable for Visual Studio 2013. I have the `rClr` package installed in my system. While installing the package I did not get any error. When I try to import the package to create my a new package it gives me the error. – SBista Apr 05 '17 at 10:27
  • And are you able to locate the DLL it's complaining about? ('msvcr120.dll') What folder is it in? Also, if you run the following, does it succeed? `library(rClr)` `library(testthat)` `test_package('rClr')` – Tim Goodman Apr 05 '17 at 10:32
  • Yes I am able to locate the dll. Its in `C:/Windows/System32/msvcr120.dll`. Running the ` test_package('rClr')` fails. It gives the following error: `1. Failure: Date and Time objects are marshalled correctly (@test-datetime.r#196)` and `2. Failure: Date and Time objects are marshalled correctly (@test-datetime.r#198)` – SBista Apr 05 '17 at 10:37
  • 1
    Got it work using `install.packages("C:/pUtils_0.1.0.tar.gz", repos = NULL, type = "source", INSTALL_opts = c("--no-multiarch"))` – SBista Apr 05 '17 at 11:50

0 Answers0