1

I started using R and when used the following code ,I got the error stating Error in library("recommenderlab") : there is no package called ‘recommenderlab’ Execution halted

and when i tried to install using install.packages("recommenderlab") I got

 /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
/usr/share/R/share/make/shlib.mk:6: recipe for target 'irlba.so' failed
make: *** [irlba.so] Error 1
ERROR: compilation failed for package ‘irlba’
* removing ‘/home/senbagaraman/R/x86_64-pc-linux-gnu-library/3.3/irlba’
ERROR: dependency ‘irlba’ is not available for package ‘recommenderlab’
* removing ‘/home/senbagaraman/R/x86_64-pc-linux-gnu-library/3.3/recommenderlab’

The downloaded source packages are in
    ‘/tmp/Rtmp82yJWk/downloaded_packages’
Warning messages:
1: In install.packages("recommenderlab") :
  installation of package ‘irlba’ had non-zero exit status
2: In install.packages("recommenderlab") :
  installation of package ‘recommenderlab’ had non-zero exit status
rams
  • 309
  • 3
  • 15
  • 1
    I would suggest to make sure that the `LAPACK` and `BLAS` libraries are installed on your operating system, as well as `gfortran`. This seems to be a problem with the configuration of the system, and not an R-related issue. – RHertel Nov 25 '16 at 16:58
  • I will try to update my system and will let you know the details @RHertel – rams Nov 25 '16 at 17:08
  • Make sure you installed R from the base-devel version. – IRTFM Nov 25 '16 at 17:49
  • @RHertel: You should make this an answer, installing the blas and lapack libraries solved the problem for me. – Exocom Feb 28 '17 at 19:33
  • @Exocom Glad to hear that my comment has helped you. I believe that in this case an answer is not necessary. The question is not related to R programming and there are several duplicates of very similar cases. Like, for instance, this one: http://stackoverflow.com/q/27033243/ – RHertel Mar 01 '17 at 06:36

1 Answers1

0

I'm using ubuntu 14.04 and I had just this error:

/usr/bin/ld: cannot find -lgfortran

I searched a little, and find out that the gfortran version and g++ version had to be the same.

lgfortran not found

So I downgrade the g++ version to the gfortran version using the steps available in the link above.

https://askubuntu.com/questions/26498/choose-gcc-and-g-version

Hope this works for you too.

Community
  • 1
  • 1