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
• 10,290 points
99 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,000 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,000 points
51 views
0 votes
1 answer

How to install an R package from source?

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

answered Apr 13, 2018 in Data Analytics by CodingByHeart77
• 3,680 points
30 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
• 35,750 points
15 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,700 points
23 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,700 points
60 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,700 points
35 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://cran.us.r-p ...READ MORE

answered Nov 26, 2018 in Data Analytics by Maverick
• 10,000 points
153 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.