3

I've successfully installed rstan, but when I try to attach it with library(rstan) I get a pop-up window with the title "RGui (64-bit): Rgui.exe - Entry Point Not Found" and the message content

The procedure entry point EXTPTR_PTR could not be located in the dynamic link library C:\Users\MyName\Documents\R\win-library\4.0\Rcpp\libs\x64\Rcpp.dll.

In the R console itself I get

> library(rstan)
Loading required package: StanHeaders
Loading required package: ggplot2
Error: package or namespace load failed for ‘rstan’ in inDL(x, as.logical(local), as.logical(now), ...):
 unable to load shared object 'C:/Users/Daniel/Documents/R/win-library/4.0/Rcpp/libs/x64/Rcpp.dll':
  LoadLibrary failure:  The specified procedure could not be found.

I'm running 4.0.0 (2020-04-24) 'Arbor Day', on a 64 bit Windows machine with Windows 10.

I thought this might have been an issue with Rtools (Rtools 4.0 not found during package installation), but having reinstalled rtools40 and properly added it to my path - and then reinstalling all of my packages to make sure there were no dependency issues - the problem with rstan persists. Any idea what might be going wrong here, and how I can get rstan working?

Empiromancer
  • 3,778
  • 1
  • 22
  • 53

2 Answers2

8

Quick ones:

  1. Did you build it yourself from source, or did you install binaries?

  2. You should probably upgrade to R 4.0.2 as there were known issues with 4.0.0 and 4.0.1.

  3. There is no issue with Rcpp per se; it builds on Windows as it should (see CRAN check pages).

But we did have numerous reports on the issue in 2. So please upgrade R to 4.0.2 and try that.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
-1

We need to updata R. In your script does the following:

First install the package

install.packages("installr")

Then:

library(installr)
updateR()

After that we install the last R update.

This help me to fix the error of Can't load the library in Windows - EXTPTR_PTR could not be located in the dynamic library

zx8754
  • 52,746
  • 12
  • 114
  • 209