从昨天开始,我正在努力解决Ubuntu上的R错误,这使得它几乎无法正常运行:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/lib/R/library/stats/libs/stats.so':
/usr/local/lib/libgcc_s.so.1: version `GCC_4.3.0' not found (required by
/usr/lib/x86_64-linux-gnu/libgfortran.so.3)
GCC肯定已安装并正常运行:
xxx@xxx:~$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc-5.real
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.1-2ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.1 20160904 (Ubuntu 5.4.1-2ubuntu1~16.04)
使用r-base r-core
清除并重新安装libgfortran3
等以及apt
无效。
我还试过从源代码重建R. make
导致错误,似乎有关:
installing 'sysdata.rda'
/root/R-3.3.1/bin/exec/R: /usr/local/lib/libgomp.so.1: version `GOMP_4.0' not found (required by /root/R-3.3.1/bin/exec/R)
/root/R-3.3.1/bin/exec/R: /usr/local/lib/libm.so.6: version `GLIBC_2.23' not found (required by /root/R-3.3.1/bin/exec/R)
../../../share/make/basepkg.mk:150: recipe for target 'sysdata' failed
我将不胜感激任何帮助。提前谢谢。
答案 0 :(得分:0)
我设法使用locate
和cp
来解决问题。我认为事实证明,/usr/local/lib/libgomp.so.1
,/usr/local/lib/libm.so.6
和/usr/local/lib/libgcc_s.so.1
库已经被破坏了。
我使用locate
从我找到的其他位置复制了库并重新安装了R。
一切都在恢复。谢谢!