0
我是igraph
的新手,仍然是綠色的R
('littler'版本0.3.2,其中R
v3.4.0)和Rstudio
(版本1.0.153)。 我剛剛安裝了R
和Rstudio
,並且在Ubuntu 17.04(64位)上安裝igraph時遇到了問題。這個問題被問到elsewhere,但沒有解決,並沒有接受答案。igraph在安裝Ubuntu時遇到困難17.04
下面描述的安裝錯誤似乎與我嘗試安裝軟件包的庫目錄無關。我試了兩個:
...通過修改文件/etc/R/Renviron
。
結果從內部RStudio在每種情況下:
> install.packages("igraph")
........
In file included from src/foreign-gml-parser.y:59:0:
igraph_hacks_internal.h:42:0: warning: "strdup" redefined
# define strdup igraph_i_strdup
In file included from /usr/include/string.h:630:0,
from src/foreign-gml-parser.y:54:
/usr/include/x86_64-linux-gnu/bits/string2.h:337:0: note: this is the location of the previous definition
# define strdup(s) __strdup (s)
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -DUSING_R -I. -Iinclude -Ics -Iglpk -Iplfit -ICHOLMOD/Include -IAMD/Include -ICOLAMD/Include -ISuiteSparse_config -g -O2 -fdebug-prefix-map=/build/r-base-X2xP8j/r-base-3.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -DNDEBUG -DNPARTITION -DNTIMER -DNCAMD -DNPRINT -DPACKAGE_VERSION=\"1.1.1\" -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL=/**/ -fpic -g -O2 -fdebug-prefix-map=/build/r-base-X2xP8j/r-base-3.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c foreign-graphml.c -o foreign-graphml.o
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");
^~~~~~~~~~~~~~~~~~~~~
/usr/lib/R/etc/Makeconf:159: recipe for target 'foreign-graphml.o' failed
make: *** [foreign-graphml.o] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/home/ckb/R/x86_64-pc-linux-gnu-library/3.4/igraph’
Warning in install.packages :
installation of package ‘igraph’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpli2vyo/downloaded_packages’
,我會非常感激,如果有人能幫助我修復。某個着名的搜索引擎不是特別有用,可能是因爲我不知道如何尋找答案。
謝謝。