1

I am facing issues while installing the kernlab R package on CentOS using the following command:

install.packages("/home/R_Libraries/kernlab_0.9-20.tar.gz", repos = NULL, type="source")

I get the following error:

Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object     '/opt/vertica/R/library/kernlab/libs/kernlab.so':
  libgfortran.so.3: wrong ELF class: ELFCLASS32

gfortran is installed as confirmed by the following command:

ldconfig -v|grep fortran

libgfortran.so.1 -> libgfortran.so.1.0.0

Can someone help with fixing this issue?

srjit
  • 526
  • 11
  • 25
Ravi
  • 3,223
  • 7
  • 37
  • 49
  • Sure, it is not just "install.packages("kernlab")" (and your options)? Did you try it in RStudio or via the console? You can also try it via "Tools"->"install packages" in RStudio. – Cleb Aug 13 '15 at 12:20
  • The CentOS machine I am using doesn't have internet access. So I have to install the package from the source. – Ravi Aug 14 '15 at 09:15

1 Answers1

0

This error:

 libgfortran.so.3: wrong ELF class: ELFCLASS32

means that you've tried to load 32-bit libgfortran into a 64-bit program.

Unfortunately you didn't tell us anything that would allow us to help you. Not even where this libgfortran is coming from.

You should make sure that a 64-bit libgfortran is installed in the system location, and the above error would go away.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362