3

I just installed the packages in time series view. There are some warnings at the end, which said some packages are installed with non-zero exit status. I looked at the earlier output, and found that the warnings are because some dependencies are "not available".

> install.views("TimeSeries")
...
ERROR: dependency ‘ks’ is not available for package ‘rugarch’
* removing ‘/usr/local/lib/R/site-library/rugarch’
...
ERROR: dependencies ‘TSclust’, ‘longitudinalData’ are not available for package ‘TSdist’
* removing ‘/usr/local/lib/R/site-library/TSdist’
...
The downloaded source packages are in
    ‘/tmp/RtmpBoB06G/downloaded_packages’
There were 34 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘gmp’ had non-zero exit status
2: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘proj4’ had non-zero exit status
3: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘rgl’ had non-zero exit status
4: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘rpanel’ had non-zero exit status
5: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘RGtk2’ had non-zero exit status
6: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘cairoDevice’ had non-zero exit status
7: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘KFKSDS’ had non-zero exit status
8: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘Rmpfr’ had non-zero exit status
9: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘RCurl’ had non-zero exit status
10: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘longitudinalData’ had non-zero exit status
11: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘kza’ had non-zero exit status
12: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘mar1s’ had non-zero exit status
13: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘Sim.DiffProc’ had non-zero exit status
14: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘stsm’ had non-zero exit status
15: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘Ecfun’ had non-zero exit status
16: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘httr’ had non-zero exit status
17: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘Bessel’ had non-zero exit status
18: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘ks’ had non-zero exit status
19: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘lubridate’ had non-zero exit status
20: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘Quandl’ had non-zero exit status
21: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘rdatamarket’ had non-zero exit status
22: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘Ecdat’ had non-zero exit status
23: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘FeedbackTS’ had non-zero exit status
24: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘nonlinearTseries’ had non-zero exit status
25: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘pdfetch’ had non-zero exit status
26: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘Rssa’ had non-zero exit status
27: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘TimeProjection’ had non-zero exit status
28: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘TSclust’ had non-zero exit status
29: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘tsoutliers’ had non-zero exit status
30: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘rugarch’ had non-zero exit status
31: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘TSdist’ had non-zero exit status
32: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘rmgarch’ had non-zero exit status
33: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘SDD’ had non-zero exit status
34: In install.packages(pkgs[[i]], repos = names(pkgs)[i],  ... :
  installation of package ‘x12GUI’ had non-zero exit status
  1. Since there are not just a few of them, is it possible to install all dependencies that haven't been installed in an automatic way?

    warnings() doesn't show why the packages' installations failed, and the output of install.views("TimeSeries") is a lot and screens behind the current scrollable history.

  2. I tried to run install.views("TimeSeries", dependencies=TRUE), and the output is similar (i.e. some dependency packages are not available). I found the dependencies argument in the manpage for install.packages(), but didn't find it with the manpage of install.views(), and I still tried my luck to use it with instal.views(). Does the argument dependencies work with install.views()?

  3. I also tried to install one dependency package individually, and still failed due to "configuration failed" for a dependency package which it further depends on:

    > install.packages("rgl", dependencies=TRUE)
    Installing package into ‘/home/t/R/x86_64-pc-linux-gnu-library/3.2’
    (as ‘lib’ is unspecified)
    also installing the dependency ‘rmarkdown’
    
    trying URL 'http://watson.nci.nih.gov/cran_mirror/src/contrib/rmarkdown_0.5.1.tar.gz'
    Content type 'application/octet-stream' length 1164928 bytes (1.1 MB)
    ==================================================
    downloaded 1.1 MB
    
    trying URL 'http://watson.nci.nih.gov/cran_mirror/src/contrib/rgl_0.95.1201.tar.gz'
    Content type 'application/octet-stream' length 1922136 bytes (1.8 MB)
    ==================================================
    downloaded 1.8 MB
    
    * installing *source* package ‘rmarkdown’ ...
    ** package ‘rmarkdown’ successfully unpacked and MD5 sums checked
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    * DONE (rmarkdown)
    * installing *source* package ‘rgl’ ...
    ** package ‘rgl’ successfully unpacked and MD5 sums checked
    checking for gcc... gcc -std=gnu99
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc -std=gnu99 accepts -g... yes
    checking for gcc -std=gnu99 option to accept ISO C89... none needed
    checking how to run the C preprocessor... gcc -std=gnu99 -E
    checking for gcc... (cached) gcc -std=gnu99
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether gcc -std=gnu99 accepts -g... (cached) yes
    checking for gcc -std=gnu99 option to accept ISO C89... (cached) none needed
    checking whether __attribute__((visibility())) is supported... yes
    checking whether gcc -std=gnu99 accepts -fvisibility... yes
    checking whether  accepts -fvisibility... no
    checking for libpng-config... yes
    configure: using libpng-config
    configure: using libpng dynamic linkage
    checking for X... libraries , headers 
    checking GL/gl.h usability... no
    checking GL/gl.h presence... no
    checking for GL/gl.h... no
    checking GL/glu.h usability... no
    checking GL/glu.h presence... no
    checking for GL/glu.h... no
    configure: error: missing required header GL/gl.h
    ERROR: configuration failed for package ‘rgl’
    * removing ‘/home/t/R/x86_64-pc-linux-gnu-library/3.2/rgl’
    
    The downloaded source packages are in
        ‘/tmp/Rtmp5W5ULa/downloaded_packages’
    Warning message:
    In install.packages("rgl", dependencies = TRUE) :
      installation of package ‘rgl’ had non-zero exit status
    

Thanks!

Tim
  • 1
  • 141
  • 372
  • 590
  • possible duplicate of ["installation of package 'FILE\_PATH' had non-zero exit status" in R](http://stackoverflow.com/questions/27893230/installation-of-package-file-path-had-non-zero-exit-status-in-r) – Metrics Apr 19 '15 at 17:17
  • 1
    Thanks. I looked at the earlier output, and found that the warnings are because some dependencies are not installed yet. Since there are not just a few of them, how shall I do to fix them? (Note that the reasons in your linked post seem not the same as here) – Tim Apr 19 '15 at 17:48
  • Do you need to install an appropriate [library](http://stackoverflow.com/questions/15292905/how-to-solve-the-error-missing-required-header-gl-gl-h-while-installing-the-p#15293440) first? You need `GL/gl.h` which might be the reason why the dependencies could not be installed. – martin Apr 21 '15 at 11:28
  • @martin: Thanks. I added `dependencies=TRUE` in `install.packages("rgl", dependencies=TRUE)`, and seems like still have the same error. Doesn't `dependencies=TRUE` install dependencies automatically? – Tim Apr 21 '15 at 11:34
  • 1
    This is a system library issue, not an R issue. – martin Apr 21 '15 at 11:35

3 Answers3

3

When looking at the output, you see:

checking for X... libraries , headers 
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
checking GL/glu.h usability... no
checking GL/glu.h presence... no
checking for GL/glu.h... no
configure: error: missing required header GL/gl.h

which means that your system does not have the required headers in order to compile rgl. You need to install those headers. On my Ubuntu 14.04 system, I would have to use

sudo apt-get install mesa-common-dev

after which the compilation/configuration should proceed a little further.

In contrast, dependencies=true only installs the R dependencies and not those belonging to the operating system.

martin
  • 3,149
  • 1
  • 24
  • 35
  • Thanks. That solved the problem of installing package "rgl". Back to original question, when I installed the packages in the view `TimeSeries`, is there some way to solve the problem for all the packages in the view? Also `warnings()` doesn't show why the packages' installations failed, and the output of `install.views("TimeSeries")` is a lot and screens behind the current scrollable history. – Tim Apr 21 '15 at 11:49
  • Can we save the output of `install.views()` (too many screens) to a file or something, so we can examine the output if there are warnings? – Tim Apr 21 '15 at 12:45
  • If you use gnome-terminal, you could set the scrollback buffer to a larger value: `Edit -> profile settings -> scrolling` to unlimited (free translation, might not be 100% accurate). – martin Apr 21 '15 at 13:02
  • Thanks. Still there are other C libraries to be installed. The output of `install.views()` doesn't collect the detail enough info at the end, and I have to look at all the long output (some are already outside the srollable range, so search in gnome terminal won't find them?) – Tim Apr 21 '15 at 16:10
2

if you use a debian based linux distro, Install gtk2 by typing

sudo apt install libgtk2.0-dev

and try again in R.

0

Apparently I can't just comment...If I could of, it would of been "Run man R and see the Redirection section in the free Advanced Bash Scripting Guide."

Try:

  1. man R

  2. Download or view a copy of Advanced Bash Scripting Guide (or abs-guide.pdf), and read section about Redirection.

    &>filename
    # Redirect both stdout and stderr to file "filename."
    # This operator is now functional, as of Bash 4, final release.
    
  3. Put your install.views("TimeSeries") into an R script file.

  4. On the command line, run:

    R [your options here] CMD BATCH "~/path/to/r/script/file.r" &>filename

I don't have any desire to install all the TimeSeries packages so I have not tested anything I have written.

Community
  • 1
  • 1