gpt4 book ai didi

r - 出现错误 "In function ‘igraph_write_graph_graphml’ :"while installing igraph package in R

转载 作者:行者123 更新时间:2023-12-02 14:04:22 28 4
gpt4 key购买 nike

我正在尝试在 R 中安装 igraph 包。但是在下面的foreign-graphml.c 中出现错误:

foreign-graphml.c: In function ‘igraph_write_graph_graphml’:
foreign-graphml.c:1408:46: error: expected ‘)’ before ‘GRAPHML_NAMESPACE_URI’
ret=fprintf(outstream, "<graphml xmlns=\"" GRAPHML_NAMESPACE_URI "\"\n");
^
foreign-graphml.c:1412:59: error: expected ‘)’ before ‘GRAPHML_NAMESPACE_URI’
ret=fprintf(outstream, " xsi:schemaLocation=\"" GRAPHML_NAMESPACE_URI
^
foreign-graphml.c:1414:38: error: expected ‘)’ before ‘GRAPHML_NAMESPACE_URI’
ret=fprintf(outstream, " " GRAPHML_NAMESPACE_URI "/1.0/graphml.xsd\">
^
/usr/lib/R/etc/Makeconf:134: recipe for target 'foreign-graphml.o' failed
make: *** [foreign-graphml.o] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/home/evangeline/R/x86_64-pc-linux-gnu-library/3.2/igraph’

The downloaded source packages are in
‘/tmp/Rtmp9eBTml/downloaded_packages’
Warning message:
In install.packages("igraph") :
installation of package ‘igraph’ had non-zero exit status

请帮助我。

请找到 session 信息: session 信息:

R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

locale:
[1] LC_CTYPE=en_IN LC_NUMERIC=C LC_TIME=en_IN
[4] LC_COLLATE=en_IN LC_MONETARY=en_IN LC_MESSAGES=en_IN
[7] LC_PAPER=en_IN LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_IN LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

最佳答案

我也遇到了同样的问题。就像之前的海报(zwartemond)指出的那样,它是 igraph 中的一个错误。 github repo 的所有者修复了该问题,但在 CRAN 上更新软件包需要一段时间,您必须等待一段时间(大约 2 周?)。

要直接从源代码安装 igraph 包,请使用 devtools:

install.packages("devtools")
library(devtools)
install_github("igraph/rigraph")

这对我有用。

关于r - 出现错误 "In function ‘igraph_write_graph_graphml’ :"while installing igraph package in R,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45318188/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com