首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更新包igraph和spdep时出现问题

更新包igraph和spdep时出现问题
EN

Stack Overflow用户
提问于 2019-02-15 02:54:49
回答 2查看 462关注 0票数 0

我正在尝试安装NormqPCR包,我必须更新两个包,igraph和spdep,但到目前为止,我不能,我也不知道我必须要做什么。这就是代码。

代码语言:javascript
复制
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
> 

有人知道一个可行的解决方案吗?谢谢!!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2019-02-16 01:06:10

在更新到R3.5之后,我今天也遇到了这个问题。

看起来一个解决方案是here

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

我还没有真正使用过它,但它现在加载没有错误。对我来说,这只是一个依赖,我甚至不能百分之百确定我要做的任何事情都将使用

票数 0
EN

Stack Overflow用户

发布于 2019-02-21 21:42:47

非常感谢沃尔特。正如该页面所述,我在编译时遇到了问题!现在,它起作用了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54697298

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档