You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Linux服务器上R包igraph安装报错求助

Installing igraph package in R 3.4.3 on Linux fails with C compiler errors

I'm trying to install the igraph package on my Linux server running R 3.4.3, but I keep hitting roadblocks when running install.packages("igraph"). I've encountered two distinct error types during the process:

1. C compiler cannot create executables

The first error occurs early in the installation process, indicating the C compiler isn't functioning properly:

* installing *source* package ‘igraph’...
** package ‘igraph’ successfully unpacked and MD5 sums checked
checking for gcc... /usr/local/bin/gcc
checking whether the C compiler works... no
configure: error: in `/tmp/RtmpPaaksz/R.INSTALL8c157a39a973/igraph':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘igraph’

2. C99 mode compilation error

The second error pops up during compilation, tied to C99 standard requirements:

lazyeval.c: In function ‘make_lazy_dots’
lazyeval.c:53: error: ‘for’ loop initial declarations are only allowed in C99 mode
lazyeval.c:53: note: use option -std=c99 or -std=gnu99 to compile your code
lazyeval.c:63: error: redefinition of ‘nxt’
lazyeval.c:53: note: previous definition of ‘nxt’ was here
make: *** [lazyeval.o] Error 1
ERROR: compilation failed for package ‘igraph’

I've already closed my original thread to maintain question consistency, but I still haven't succeeded in installing the package. Any practical solutions or guidance would be really helpful!

内容的提问来源于stack exchange,提问作者inmybrain

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:08:10