-5

I want to install package ade4 that is a "R" language package in ubuntu 15.10 However it gives me the following error.

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c adesub.c -o adesub.o
gcc: error trying to exec 'cc1': execvp: No such file or directory

I also installed r-base-dev package

I checked the g++ and build-install packages and both of them are installed and have the same version. How I can solve this issue?

SSD
  • 359
  • 1
  • 3
  • 15
  • What does `which g++` return? – nrussell Dec 28 '15 at 18:51
  • it returns /usr/bin/g++ – SSD Dec 28 '15 at 19:00
  • In any case this does not seem to be a general problem of Ubuntu 15.10 or ade4. The package compiles and works on my installation of Ubuntu 15.10. Is `/usr/bin` included in the output of `echo $PATH` ? – RHertel Dec 28 '15 at 19:28
  • yes it echoes it. Is there any thing with permission? I gave 777 permission to all related directories although I still have the problem – SSD Dec 28 '15 at 19:37
  • I think R-Studio does not recognize the installation path of the gcc. It is weird. – SSD Dec 28 '15 at 19:39
  • No, I don't think it's related to permissions. I believe it's a matter of `PATH`.. or some compiler-related environment variable. Does it work without RStudio, i.e., in a simple R shell? – RHertel Dec 28 '15 at 19:40
  • I tried it and I got the same error – SSD Dec 28 '15 at 19:47
  • @lmo May I ask you please to up vote my question I cannot ask any more question. – SSD Jun 01 '16 at 22:14
  • do http://askubuntu.com/questions/714395/error-trying-to-exec-cc1-execvp-no-such-file-or-directory-possible-sage-pyt or http://stackoverflow.com/questions/11912878/gcc-error-gcc-error-trying-to-exec-cc1-execvp-no-such-file-or-directory give you any clues? – Ben Bolker Jun 02 '16 at 15:41
  • @Ben Bolker thanks. I got my answer however down-vote to my question do not allow me to ask further question. – SSD Jun 02 '16 at 15:53
  • I don't see an accepted answer to this question (it doesn't seem that @DirkEddelbuettel's answer addressed your question); if the comments gave you an answer, can you post it yourself? That would be a useful way to contribute to the site/convince people to up-vote the question. – Ben Bolker Jun 02 '16 at 16:27

1 Answers1

3

Do the following:

 sudo apt-get install r-base-dev

which is a 'virtual' package containing only dependency information which ensures you have the compiler (via package build-essentials) and a number of things generally needed to build R packages.

PS There is no such thing as Ubuntu 15.1. There are 15.04 and 15.10.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725