Search
Question: Please help me with the error of " installation of package had non-zero exit status"
0
gravatar for Sara
2.5 years ago by
Sara0
Sara0 wrote:

Hi all,

I'm trying to install the qvalue package on my account on the server. But, when I typed the following commands:

source('http://bioconductor.org/biocLite.R')
biocLite("qvalue")

I got the following error and warning message and the package has not been installed. However, I successfully install the "Biobase" package in the same way. Could you please help me out to solve the problem?

> source('http://bioconductor.org/biocLite.R')
Bioconductor version 3.2 (BiocInstaller 1.20.3), ?biocLite for help
A new version of Bioconductor is available after installing the most recent
  version of R; see http://bioconductor.org/install
> biocLite("qvalue")
BioC_mirror: http://bioconductor.org
Using Bioconductor 3.2 (BiocInstaller 1.20.3), R 3.2.3 (2015-12-10).
Installing package(s) 'qvalue'
also installing the dependencies 'plyr', 'scales', 'ggplot2', 'reshape2'

trying URL 'http://cran.rstudio.com/src/contrib/plyr_1.8.4.tar.gz'
Content type 'application/x-gzip' length 392451 bytes (383 KB)
==================================================
downloaded 383 KB

trying URL 'http://cran.rstudio.com/src/contrib/scales_0.4.0.tar.gz'
Content type 'application/x-gzip' length 57358 bytes (56 KB)
==================================================
downloaded 56 KB

trying URL 'http://cran.rstudio.com/src/contrib/ggplot2_2.1.0.tar.gz'
Content type 'application/x-gzip' length 1571788 bytes (1.5 MB)
==================================================
downloaded 1.5 MB

trying URL 'http://cran.rstudio.com/src/contrib/reshape2_1.4.1.tar.gz'
Content type 'application/x-gzip' length 34693 bytes (33 KB)
==================================================
downloaded 33 KB

trying URL 'http://bioconductor.org/packages/3.2/bioc/src/contrib/qvalue_2.2.2.tar.gz'
Content type 'application/x-gzip' length 2757615 bytes (2.6 MB)
==================================================
downloaded 2.6 MB

* installing *source* package 'plyr' ...
** package 'plyr' successfully unpacked and MD5 sums checked
** libs
g++ -I/share/apps/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/share/apps/R/lib64/R/l                                                                        ibrary/Rcpp/include"   -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
gcc -I/share/apps/R/lib64/R/include -DNDEBUG  -I/usr/local/include -I"/share/apps/R/lib64/R/l                                                                           ibrary/Rcpp/include"   -fpic  -g -O2  -c loop_apply.c -o loop_apply.o
loop_apply.c: In function 'loop_apply_':
loop_apply.c:15:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for(int i = 0; i < n1; i++) {
   ^
loop_apply.c:15:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile y                                                                           our code
make: *** [loop_apply.o] Error 1
ERROR: compilation failed for package 'plyr'
* removing '/home/jafarinezhad/R/x86_64-pc-linux-gnu-library/3.2/plyr'
ERROR: dependency 'plyr' is not available for package 'scales'
* removing '/home/jafarinezhad/R/x86_64-pc-linux-gnu-library/3.2/scales'
ERROR: dependency 'plyr' is not available for package 'reshape2'
* removing '/home/jafarinezhad/R/x86_64-pc-linux-gnu-library/3.2/reshape2'
ERROR: dependencies 'plyr', 'reshape2', 'scales' are not available for package 'ggplot2'
* removing '/home/jafarinezhad/R/x86_64-pc-linux-gnu-library/3.2/ggplot2'
ERROR: dependencies 'ggplot2', 'reshape2' are not available for package 'qvalue'
* removing '/home/jafarinezhad/R/x86_64-pc-linux-gnu-library/3.2/qvalue'

The downloaded source packages are in
        '/tmp/Rtmptgrru9/downloaded_packages'
Old packages: 'mgcv', 'nlme', 'boot', 'cluster', 'Matrix', 'mgcv', 'nlme',
  'nnet', 'Rcpp', 'stringi', 'survival'
Update all/some/none? [a/s/n]: n
Warning messages:
1: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package 'plyr' had non-zero exit status
2: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package 'scales' had non-zero exit status
3: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package 'reshape2' had non-zero exit status
4: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package 'ggplot2' had non-zero exit status
5: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package 'qvalue' had non-zero exit status

Also the sessionInfo() is below:

R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS release 6.6 (Final)

locale:
 [1] LC_CTYPE=en_US.iso885915       LC_NUMERIC=C
 [3] LC_TIME=en_US.iso885915        LC_COLLATE=en_US.iso885915
 [5] LC_MONETARY=en_US.iso885915    LC_MESSAGES=en_US.iso885915
 [7] LC_PAPER=en_US.iso885915       LC_NAME=C
 [9] LC_ADDRESS=C                   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

Thank you for your help in advance.

ADD COMMENTlink modified 2.5 years ago by Martin Morgan ♦♦ 22k • written 2.5 years ago by Sara0
0
gravatar for Martin Morgan
2.5 years ago by
Martin Morgan ♦♦ 22k
United States
Martin Morgan ♦♦ 22k wrote:

Simplify your troubleshooting by trying to install only the troublesome package

> biocLite("plyr")

Your R is configured to use the GCC C compiler in an inappropriate way. How did you install R?

$ gcc --version
gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413

and the flags you see are ok for that. For earlier versions of gcc it has been necessary to add -std=c99 for compilation. R should have figured this out on installation; perhaps the compiler is different from the one available when R was installed? You can work around this

$ mkdir ~/.R
$ cat > ~/.R/Makevars
CC=gcc -std=c99
^D

but it  would be better to figure out what the problem is with your R installation.

ADD COMMENTlink written 2.5 years ago by Martin Morgan ♦♦ 22k
Thank you for your reply, Martin. Actually, our admin installed R, I checked the gcc version, which was gcc (GCC) 4.9.0. Sorry, I'm new in this field, could you please help me more? you mentioned that for earlier versions of gcc it has been necessary to add -std=c99 for compilation. Please let me know where I should add this flag? Thank you
ADD REPLYlink written 2.5 years ago by Sara0

You as a user can accomplish this with the commands indicated above -- create a file ./R/Makevars with the single line CC=gcc -std=c99. Your system administrator should consult the R Installation and Administration guide.

ADD REPLYlink written 2.5 years ago by Martin Morgan ♦♦ 22k

Thank you, I'll try it.

ADD REPLYlink written 2.5 years ago by Sara0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 247 users visited in the last hour