Failing to install a package

I'm on ubuntu 18.04, I just added the package repository for r 4.0.3 (sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/')

And when I tried to install a package, I got the following error message:

(... a lot more throw x similar to the line below this one)
smat.cpp:980:32: warning: macro "__DATE__" might prevent reproducible builds [-Wdate-time]
   THROW (a.size () == b.size ()) ;
                                ^
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o pcaPP.so L1Median_HoCr.o L1Median_VardiZhang.o ML_meal.o ML_package.o ML_passrng.o PCAgrid.o PCAproj.o R_meal.o R_meal_BLAS.o R_package.o cov.kendall.o hess.o l1median.o outSDo.o pcaPP.o pcaPP_init.o qnn.o smat.o -llapack -lblas -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
/usr/share/R/share/make/shlib.mk:10: recipe for target 'pcaPP.so' failed
make: *** [pcaPP.so] Error 1
ERROR: compilation failed for package ‘pcaPP’
* removing ‘/home/joost/R/x86_64-pc-linux-gnu-library/4.0/pcaPP’
Warning in install.packages :
  installation of package ‘pcaPP’ had non-zero exit status
ERROR: dependencies ‘gsl’, ‘pcaPP’ are not available for package ‘copula’
* removing ‘/home/joost/R/x86_64-pc-linux-gnu-library/4.0/copula’
Warning in install.packages :
  installation of package ‘copula’ had non-zero exit status

I'm not sure how to fix this issue. Can someone here help me with it?

Seems you are missing at least two system utilities in order to compile

/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas

I would investigate how to install these on the system.

1 Like

Thanks, that seemed to be the problem. After I installed them using

sudo apt-get install libblas-dev liblapack-dev

another packages was still missing (gsl), which I installed using

sudo apt-get install libgsl0-dev
1 Like

This topic was automatically closed 7 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.