r can't install rstan r version 4.1.0 ubuntu 20.04.2

Viewed 381

I'm having trouble installing rstan in R. I've tried using install.packages() (and the package installer) and get the following error:

/home/linuxbrew/.linuxbrew/bin/ld: cannot find -llapack
/home/linuxbrew/.linuxbrew/bin/ld: cannot find -lblas
/home/linuxbrew/.linuxbrew/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:10: RcppEigen.so] Error 1
ERROR: compilation failed for package ‘RcppEigen’
* removing ‘/home/dave/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen’

Warning in install.packages :
  installation of package ‘RcppEigen’ had non-zero exit status
ERROR: dependency ‘RcppEigen’ is not available for package ‘StanHeaders’
* removing ‘/home/dave/R/x86_64-pc-linux-gnu-library/4.1/StanHeaders’
Warning in install.packages :
  installation of package ‘StanHeaders’ had non-zero exit status
ERROR: dependencies ‘StanHeaders’, ‘RcppEigen’ are not available for package ‘rstan’
* removing ‘/home/dave/R/x86_64-pc-linux-gnu-library/4.1/rstan’
Warning in install.packages: 
installation of package ‘rstan’ had non-zero exit status
0 Answers
Related