安装包时无法获得R键识别安装libgfortran

问题描述 投票:0回答:1

我试图安装R中依赖于libgfortran包,但我不断收到此错误:

dyld: Library not loaded: /usr/local/opt/gcc/lib/gcc/7/libgfortran.4.dylib
  Referenced from: /usr/local/Cellar/r/3.4.3_1/lib/libR.dylib
  Reason: image not found

我已经通过gfortran自制GCC安装:

 ❯❯ readlink `which gfortran`
../Cellar/gcc/8.2.0/bin/gfortran

有可在/usr/local/opt/gcc/lib/gcc/8/libgfortran.5.dylib一个libgfortran,但是这并不是一个R所期待的。如何说服R键寻找,而不是GCC 7 GCC 8?

r homebrew gfortran
1个回答
1
投票

“我怎么说服R键寻找,而不是GCC 7 GCC 8?”

你不应该这样做!这些库是不兼容的,这就是为什么SONAME改变。该ABI是不同的。你需要GCC的正确版本这是用来编译[R包。看的很类似(但Linux)的问题和答案一样R v3.4.0-2 unable to find libgfortran.so.3 on Arch How to install libgfortran.so.4 on ubuntu 16.06

你真的需要兼容库或更新您的R键使用GCC 8版本。

© www.soinside.com 2019 - 2024. All rights reserved.