0

i'm having this error when trying to install RcppArmadillo in R, and is driving me crazy, i've not been able to find how to deal with it:

Error: package or namespace load failed for ‘RcppArmadillo’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/Ghost/Rlibs/00LOCK-RcppArmadillo/00new/RcppArmadillo/libs/RcppArmadillo.so':
  dlopen(/Users/Ghost/Rlibs/00LOCK-RcppArmadillo/00new/RcppArmadillo/libs/RcppArmadillo.so, 6): Symbol not found: _wrapper2_ddot_
  Referenced from: /Users/Ghost/Rlibs/00LOCK-RcppArmadillo/00new/RcppArmadillo/libs/RcppArmadillo.so
  Expected in: flat namespace
 in /Users/Ghost/Rlibs/00LOCK-RcppArmadillo/00new/RcppArmadillo/libs/RcppArmadillo.so
Error: loading failed

Any insights/advice on how to fix it?

Ghost
  • 1,426
  • 5
  • 19
  • 38
  • 2
    Remove your system installation of Armadillo. Within your setup it seems to be interfering with RcppArmadillo. You do not need to install Armadillo in order to use RcppArmadillo. – hbrerkere Sep 05 '19 at 03:12
  • Will give it a try, thanks! – Ghost Sep 05 '19 at 12:32
  • Nope, i reinstalled `armadillo` and exactly the same error.. – Ghost Sep 05 '19 at 17:10
  • 1
    No, you need to completely uninstall armadillo. Do it manually. Armadillo and RcppArmadillo are related yet two distinct things. They seem to be interfering with each other on your system, so remove one of them. – hbrerkere Sep 06 '19 at 01:18
  • Sorry mate, i misread. I uninstalled armadillo and worked flawlessly!! Thanks a lot! – Ghost Sep 06 '19 at 17:24

1 Answers1

0

Something is not quite right with your setup. As a possible workaround, define ARMA_DONT_USE_WRAPPER before including RcppArmadillo in your code.

#define ARMA_DONT_USE_WRAPPER
#include <RcppArmadillo.h>
mtall
  • 3,574
  • 15
  • 23