R v3.4.0-2无法找到Arch上的libgfortran.so.3

问题描述:

我刚刚度假了一个月,所以无法确定发生这种情况的确切时间,但官方Arch回购的R现在无法开始,理由R v3.4.0-2无法找到Arch上的libgfortran.so.3

/usr/lib64/R/bin/exec/R: error while loading shared libraries: 
libgfortran.so.3: cannot open shared object file: No such file or directory 

我想也许一个符号被放置不当或销毁,所以我看着在/ usr/lib目录,试图找到它:

ls -halt /usr/lib/libgfortran.so.*

lrwxrwxrwx 1 root root 20 May 16 03:01 /usr/lib/libgfortran.so.4 -> libgfortran.so.4.0.0 
-rwxr-xr-x 1 root root 7.1M May 16 03:01 /usr/lib/libgfortran.so.4.0.0 

已将libfortran.so.3替换为Arch中的libgfortran.so.4?如果是这样,是否有任何可能的解决办法让R与旧版本运行?


pacman -Qi r

Name   : r 
Version   : 3.4.0-2 
Description  : Language and environment for statistical computing and graphics 
Architecture : x86_64 
URL    : http://www.r-project.org/ 
Licenses  : GPL 
Groups   : None 
Provides  : None 
Depends On  : blas lapack bzip2 libpng libjpeg libtiff ncurses pcre readline zlib perl gcc-libs libxt libxmu pango xz desktop-file-utils zip unzip 
Optional Deps : tk: tcl/tk interface [installed] 
        texlive-bin: latex sty files [installed] 
Required By  : None 
Optional For : graphviz 
Conflicts With : None 
Replaces  : None 
Installed Size : 58.04 MiB 
Packager  : Evangelos Foutras <[email protected]> 
Build Date  : Tue 25 Apr 2017 05:04:31 AM EDT 
Install Date : Tue 20 Jun 2017 12:27:06 PM EDT 
Install Reason : Explicitly installed 
Install Script : No 
Validated By : Signature 

编辑:如果任何人遇到这样的r-devel AUR正确编译和运行,所以希望在下一版本的磕碰问题将得到解决。

事实上,gfortran 7将ligfortran版本颠覆为版本4.请参阅http://gcc.1065356.n8.nabble.com/patch-fortran-PR77828-Linking-gfortran-7-compiled-program-with-libgfortran-of-5-x-allowed-but-crashes-td1311625.html它不向后兼容,某些API已更改。

如果你安装的是旧版本的gfortran,你会得到libgfortran.so.3。在你的系统中有多个版本是完全正确的。也许有一种方法来重建版本4的R,但它可能会有更多的工作。

+0

谢谢弗拉基米尔,你是否知道任何将gfortran降级到6的方法*而不降级所有的'gcc'?通常的方法(从'pacman'安装软件包的缓存版本)不幸是一个不行,因为它需要一个相同版本的'gcc',我不愿意破坏我的系统其余部分。 –

+0

不要降级,这不是一个好主意。安装GCC的其他版本。 –

+1

https://gist.github.com/slizzered/a9dc4e13cb1c7fffec53 –

我使用一个名为pyferret的软件,它需要libgfortran.so.3。我正在运行fedora 27,其软件包管理器默认安装gfortran 7(更高版本)。这会产生/usr/lib64中的共享对象libgfortran.so.4。另一个运行Ubuntu 16.04.3的Linux系统,但是有libgfortran.so.3。我把它复制到我的系统在〜/ PKGS /库和运行应用程序为

export LD_PRELOAD=/home/vasu/pkgs/libs/libgfortran.so.3:/home/vasu/pkgs/libs/libopenblas.so.0;pyferret 

这工作没有上述错误。

+0

根据许多不可预知的因素,将一个二进制文件从一个Linux发行版复制到另一个发行版可能会也可能不会发挥作用。但很高兴知道它在这种情况下起作用。 –

+1

是的。我同意。它可能会或可能不会工作。但它在我的情况下工作,OP可以试一试。我也知道在具有更高版本软件的系统中构建较低版本是相当困难的。 –

R中有很多包依赖于GCC Fortran。其中一些尚未更新,无法针对新的GCC进行编译,而某些软件包会根据这些更新进行更新,deldir和robustbase就是两个例子。

检查您的警告并安装任何未能加载的软件包,然后执行升级。