我正在尝试安装软件包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:找不到
发布评论