安裝 r 裏的 igraph 報錯
阿新 • • 發佈:2018-01-26
post sta lns pack targe apt-get write libxml ml2
轉載來源:http://genek.tv/article/40
安裝 r 裏的 igraph 報錯:
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 "\n"); ^ foreign-graphml.c:1414:38: error: expected ‘)’ before ‘GRAPHML_NAMESPACE_URI’ ret=fprintf(outstream, " " GRAPHML_NAMESPACE_URI "/1.0/graphml.xsd\">\n"); ^ /home/genek/miniconda3/lib/R/etc/Makeconf:133: recipe for target ‘foreign-graphml.o‘ failed make: *** [foreign-graphml.o] Error 1 ERROR: compilation failed for package ‘igraph’ * removing ‘/home/genek/miniconda3/lib/R/library/igraph’ * restoring previous ‘/home/genek/miniconda3/lib/R/library/igraph’
解決辦法
sudo apt-get install libxml2-dev
安裝 r 裏的 igraph 報錯