Got message unable to load shared object stats.so when R starts

霸气de小男生 提交于 2019-11-27 14:04:36

Somehow your system configuration or running environment has changed between the time you compiled R and the time you are using it, in particular the libgfortran.so.3 library is no longer discoverable. Likely if you do

$ R CMD ldd /path/to/R_HOME/library/stats/libs/stats.so

you'll get a list of successfully discovered link dependencies

linux-vdso.so.1 =>  (0x00007fff213ff000)
libRlapack.so => /path/to/R_HOME/lib/libRlapack.so (0x00007fcafa557000)

and then a failure

    libgfortran.so.3 => ???

indicating that libgfortran.so.3 is not found. You could go looking for it

locate libgfortran.so.3

and then figure out what you've done to make it inaccessible to R (maybe ldconfig would be your friend). But libgfortran would most likely be in a standard location, so you've probably removed it in some other operation and need to reinstall it, or recompile R against the new location of libgfortran.

Specify the location of libgfortran using the system command ldconfig (sudo privileges required) or the environment variable LD_LIBRARY_PATH. But really these shouldn't be necessary, libgfortan should have been installed using your OS package manager and in a way that does not require special additional configuration.

hlfernandez

EDIT: I have discovered that putting the missing libraries in the directory R/lib solves the problem, thank you very much for the help!

If i run the ldd command I get:

bin/R CMD ldd ./library/stats/libs/stats.so
/home/hlfernandez/Eclipse/workspace/Bioscope/R/linux/x64/R-3.0.2

linux-vdso.so.1 =>  (0x00007fff47dfe000)

libRlapack.so => /home/hlfernandez/Eclipse/workspace/Bioscope/R/linux/x64/R-3.0.2/lib/libRlapack.so (0x00007fb595bb0000)

libRblas.so => /home/hlfernandez/Eclipse/workspace/Bioscope/R/linux/x64/R-3.0.2/lib/libRblas.so (0x00007fb595983000)

libgfortran.so.3 => not found

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb595665000)

libR.so => /home/hlfernandez/Eclipse/workspace/Bioscope/R/linux/x64/R-3.0.2/lib/libR.so (0x00007fb5950c3000)

libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007fb594eb4000)

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb594c97000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb5948ce000)

libgfortran.so.3 => not found

libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x00007fb59468c000)

librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb594483000)

 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb59427f000)

/lib64/ld-linux-x86-64.so.2 (0x00007fb596205000)

 libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fb594056000)

As you have said, there is a failure with libgfortran.so.3. ¿Is there a way to manually indicate where the libgfortran3.so file is located?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!