Lot of errors when trying to install R package igraph

0 votes

I'm trying to install R package "igraph" in Linux server and stuck with some errors.

I've tried install.packages("igraph"), and got these error messages :

Problem related with checking whether the C compiler works... no :

* 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’

Problem related with lazyeval.c:53: error: ‘for’ loop initial declarations are only allowed in C99 mode :

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’
Nov 12, 2018 in Data Analytics by Ali
• 11,360 points
1,792 views

1 answer to this question.

0 votes

change your ~/.R/Makevars file as

C=gcc-5
CXX=g++
CXX1X = g++-5
CFLAGS = -std=c99 -Wall -pedantic
answered Nov 12, 2018 by Maverick
• 10,840 points

Related Questions In Data Analytics

0 votes
1 answer

Error saying "Error in df$item : object of type 'closure' is not subsettable" when trying to use arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,840 points
1,822 views
0 votes
1 answer

How to install an R package from source?

If you have your file located locally ...READ MORE

answered Apr 14, 2018 in Data Analytics by CodingByHeart77
• 3,750 points
951 views
0 votes
1 answer

Most common errors faced when programming with R

These the two most common errors I ...READ MORE

answered Oct 31, 2018 in Data Analytics by Kalgi
• 52,350 points
702 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
2,266 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
1,963 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 9, 2020 by Gitika 1,201 views
0 votes
1 answer
0 votes
1 answer

Error saying " cannot open the connection" when trying to install a package in R

Try install.packages(“package_name”, repos="http://cr ...READ MORE

answered Nov 26, 2018 in Data Analytics by Maverick
• 10,840 points
9,213 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP