构建R程序包,并显示错误"ld:找不到

编程入门 行业动态 更新时间:2024-10-26 04:23:42
本文介绍了构建R程序包,并显示错误"ld:找不到-lgfortran".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试安装软件包Lars. Ubuntu 11.04 Natty 64位.从建筑物中我得到:

I'm trying to install the package lars. Ubuntu 11.04 Natty 64-bit. From building I get:

* installing *source* package âlarsâ ... ** libs gfortran -fpic -O3 -pipe -g -c delcol.f -o delcol.o gcc -shared -o lars.so delcol.o -lgfortran -lm -L/usr/lib64/R/lib -lR /usr/bin/ld: cannot find -lgfortran collect2: ld returned 1 exit status make: *** [lars.so] Error 1 ERROR: compilation failed for package âlarsâ

gfortran已安装,当我运行gfortran --version时,我得到

gfortran is installed and when I run gfortran --version I get

gfortran --version GNU Fortran (Ubuntu/Linaro 4.5.2-8ubuntu4)4.5.2

gfortran --version GNU Fortran (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2

sudo ldconfig -v给出错误

/sbin/ldconfig.real:无法统计/usr/lib/libgfortran.so:没有此类文件或目录

/sbin/ldconfig.real: Cannot stat /usr/lib/libgfortran.so: No such file or directory

我已经删除并重新安装了gfortran.我该如何解决?

I have already removed and reinstalled gfortran. What do I need to fix this?

推荐答案

对于Debian/Ubuntu系列,我们通常建议

For the Debian / Ubuntu family, we usually recommend

$ sudo apt-get install r-base-dev

,因为它提取了编译通常需要的所有软件包.而且,由于自动化的软件包构建器依赖于此方法(以及其他基于软件包的Build-Depends),因此该方法一直受到测试. gfortran软件包也在此处列出;也许您以前的安装中的链接断开了,所以我也尝试dpkg --purge gfortran; apt-get install gfortran.也就是说,数十个R程序包(和R本身)都使用Fortran,因此这里不应该有任何魔术.

as it pulls in all packages commonly needed for compiling. And this approach gets tested all the time as the automated package builders rely on this (as well as additional per-package Build-Depends). The gfortran package is listed here too; maybe you have a broken link from a prior installation so I'd also try dpkg --purge gfortran; apt-get install gfortran. That said, dozens of R packages (and R itself) use Fortran so there should not be any magic here.

更多推荐

构建R程序包,并显示错误"ld:找不到

本文发布于:2023-07-15 10:31:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1110679.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   错误   程序包   quot   ld

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!