Question

I'm trying to install the AltDesign and ggplot2 packages, but it won't work. I'm running R 3.0.1 on RStudio 0.98.490 using my Linux Mint 16 "Petra" computer. I never encountered this problem before on Windows or Ububtu 13.10 (which is weird since Petra is based on 13.10). This is the console output when I try to install AlgDesign:

    > install.packages("AlgDesign")
    Installing package into ‘/home/david/R/x86_64-pc-linux-gnu-library/3.0’
    (as ‘lib’ is unspecified)
    trying URL 'http://cran.rstudio.com/src/contrib/AlgDesign_1.1-7.tar.gz'
    Content type 'application/x-gzip' length 472224 bytes (461 Kb)
    opened URL
    ==================================================
    downloaded 461 Kb

    * installing *source* package ‘AlgDesign’ ...
    ** package ‘AlgDesign’ successfully unpacked and MD5 sums checked
    ** libs
    gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -O3 -pipe  -g  -c FederovOpt.c -o FederovOpt.o
    FederovOpt.c:8:20: fatal error: string.h: No such file or directory
     #include <string.h>
                        ^
    compilation terminated.
    make: *** [FederovOpt.o] Error 1
    ERROR: compilation failed for package ‘AlgDesign’
    * removing ‘/home/david/R/x86_64-pc-linux-gnu-library/3.0/AlgDesign’
    Warning in install.packages :
      installation of package ‘AlgDesign’ had non-zero exit status

    The downloaded source packages are in
        ‘/tmp/RtmpKe1Et7/downloaded_packages’

Something similar happens with ggplot2. A problem with "No such file or directory" which derives in "non-zero exit status".

I just started using Linux so a little bit of help would be greatly appreciated!

Thanks!

David

Was it helpful?

Solution

This looks like a problem with the R installation. As explained here:

http://cran.r-project.org/bin/linux/ubuntu/README

you need to install R-base-dev to install from source. This package contains the necessary tools to build R packages from a tarball (.tar.gz file).

Note that installing from CRAN on a Linux system using install.packages() also requires the R-base-dev. install.packages() downloads the source tarball from CRAN and builds the package on your own system.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top