Package Installation Error on Ubuntu 20.4

I have recently begun using R on Linux after having exclusively done so on Windows in the past. I'm comfortablee with Linux systems, but still certainly not an expert. I am trying to install the psych package, which has dependencies on tmvnsim and mnormt, but I have been running into issues unpacking any of them. Initially, I was having a compiler issue, so I sudo apt-get install gfortran'ed, which resolved that. Now I'm getting:

* installing *source* package ‘tmvnsim’ ...
** package ‘tmvnsim’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/share/R/include" -DNDEBUG      -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-lENDSu/r-base-4.1.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c Fortran2CWrapper.c -o Fortran2CWrapper.o
gfortran -fno-optimize-sibling-calls  -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-lENDSu/r-base-4.1.3=. -fstack-protector-strong  -c  tmvnghk.f90 -o tmvnghk.o
gcc -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o tmvnsim.so Fortran2CWrapper.o tmvnghk.o -llapack -lblas -lgfortran -lm -lquadmath -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:10: tmvnsim.so] Error 1
ERROR: compilation failed for package ‘tmvnsim’

Based upon this post, I'm inclined to believe that this is an issue of certain lib.so files not being located where they are expected to be, but searching through the drive for them hasn't been fruitful (it's also a brand new Linux, so relatively little to search through anyway). I'm at a loss to make more sense of the error and haven't found any posts noting the issue. Any suggestions?

You are missing these two system dependencies, try with

sudo apt install libblas-dev liblapack-dev
1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.