Error installing package regsem

I am trying to install the R package regsem on my Ubuntu 20.04 LTS virtual desktop. The install goes fine up to the last step, where it crashes.

g++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o regsem.so RcppExports.o regsem_init.o regsem_rcpp_RAMmult.o regsem_rcpp_fit_fun.o regsem_rcpp_grad_ram.o regsem_rcpp_quasi_calc.o -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status

The regsem package Description lists the following dependencies, all of which are installed on my desktop:

|Depends: |lavaan, Rcpp, Rsolnp|
|LinkingTo: |Rcpp, RcppArmadillo|

Any suggestions as to how I can fix this installation? Thanks in advance.
Larry Hunsicker

Update: Found in a different query about missing linux packages This fixed the problem.
sudo apt-get install libblas-dev liblapack-dev gfortran

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.