Cannot install rstan package on Ubuntu 18.04.6

Hi

I’m trying to install rstan on Ubuntu
Sudo R
remove.packages(c(“StanHeaders”, “rstan”))
install.packages(“StanHeaders”, repos = c(“Repository for distributing (some) stan-dev R packages | r-packages”, getOption(“repos”)))
install.packages(“rstan”, repos = c(“Repository for distributing (some) stan-dev R packages | r-packages”, getOption(“repos”)))

But I meet an error and want to know how to solve it

testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rstan’:
.onLoad failed in loadNamespace() for ‘rstan’, details:
call: NULL
error: TypeError: Object # has no method ‘imul’
Error: loading failed
Execution halted
ERROR: loading failed

  • removing ‘/usr/local/lib/R/site-library/rstan’

The downloaded source packages are in
‘/tmp/RtmpyDKJhB/downloaded_packages’
Warning message:
In install.packages(“rstan”, repos = c(“Repository for distributing (some) stan-dev R packages | r-packages”, :
installation of package ‘rstan’ had non-zero exit status


It’s very urgent and important to me. Please help me fix it.Thanks

Sorry about the delay. I have Ubuntu running rstan but it’s at my home office. I’ll won’t be back there until this evening (Mountain Time, USA, GMT-6). I can take a look a then. Which version of R and rstan are you using?