更新包igraph和spdep的问题

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

我试图安装包NormqPCR,我必须更新两个包,igraph和spdep,但直到现在我无法,我无法弄清楚我必须做什么。这是代码。

if (!requireNamespace("BiocManager", quietly = TRUE))
+     install.packages("BiocManager")
> BiocManager::install("NormqPCR", version = "3.8")
Bioconductor version 3.8 (BiocManager 1.30.4), R 3.5.2 (2018-12-20)
Installing package(s) 'NormqPCR'
trying URL 'https://bioconductor.org/packages/3.8/bioc/bin/macosx/el-capitan/contrib/3.5/NormqPCR_1.28.0.tgz'
Content type 'application/x-gzip' length 425843 bytes (415 KB)
==================================================
downloaded 415 KB


The downloaded binary packages are in
    /var/folders/1d/n28vx45163z4ksd8pcqxjwzh0000gn/T//Rtmpb5GHtX/downloaded_packages
Update old packages: 'BiocInstaller', 'igraph', 'spdep'
Update all/some/none? [a/s/n]: 
a

  There are binary versions available but the source versions are later:
       binary source needs_compilation
igraph  1.2.3  1.2.4              TRUE
spdep   0.8-1  1.0-2              TRUE

Do you want to install from sources the packages which need compilation? (Yes/no/cancel) Yes
trying URL 'https://bioconductor.org/packages/3.8/bioc/bin/macosx/el-capitan/contrib/3.5/BiocInstaller_1.32.1.tgz'

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [spdep.so] Error 1
ERROR: compilation failed for package ‘spdep’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/spdep’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/spdep’

The downloaded source packages are in
    ‘/private/var/folders/1d/n28vx45163z4ksd8pcqxjwzh0000gn/T/Rtmpb5GHtX/downloaded_packages’
Warning messages:
1: In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘igraph’ had non-zero exit status
2: In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘spdep’ had non-zero exit status
> 

有人知道可能的解决方案?谢谢!!

r igraph spdep
2个回答
0
投票

在更新到R 3.5之后,我今天也遇到了这个问题。

看起来像here的解决方案。

基本上,它安装gfortran 6.3.0,并在〜/ .R / Makevars文件中设置环境变量。

我还没有真正使用它,但它现在加载没有错误。这对我来说只是一种依赖,而且我甚至不能100%确定我会做的任何事情都会使用


0
投票

非常感谢沃尔特。正如它在该页面中所述,我遇到编译问题!现在,它的工作原理。

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