Search code examples
rgccopensuse

R packages in openSUSE 13.1


This issue was reported on stack overflow before but no matter what I do I still get the same thing. Whenever I try to install any R package i get the following:

install.packages("Hmisc", repos = "http://cran.r-project.org")
Installing package into ‘/home/budjajojo/R_packages’
(as ‘lib’ is unspecified)
trying URL 'http://cran.r-project.org/src/contrib/Hmisc_3.13-0.tar.gz'
Content type 'application/x-gzip' length 587751 bytes (573 Kb)
opened URL
==================================================
downloaded 573 Kb

* installing *source* package ‘Hmisc’ ...
** package ‘Hmisc’ successfully unpacked and MD5 sums checked
** libs
sh: make: command not found
ERROR: compilation failed for package ‘Hmisc’
* removing ‘/home/budjajojo/R_packages/Hmisc’

The downloaded source packages are in
        ‘/tmp/Rtmp6fA61h/downloaded_packages’
Warning message:
In install.packages("Hmisc", repos = "http://cran.r-project.org") :
  installation of package ‘Hmisc’ had non-zero exit status

I am using the new openSUSE 13.1. and R version 3.0.2. that I have installed from R-patched repositories.

Besides the solution from the similar post I have tried the following:

  • changing the library path to be in my home folder (maybe privileges issue)
  • installing and updating the gcc compiler (both gcc++ and gfortran)
  • changing between versions of the gcc with update-alternatives (tried the gcc3 version)
  • tried everything as a superuser

Off course none of the above solutions worked. I think it is gcc issue (ver. 4.8.1) but I`m not sure what can be done.


Solution

  • openSUSE does not come with make installed by default. You have to install it with Yast or type in terminal:

    sudo zypper install make
    

    Usually, to be sure everything works fine with R on openSUSE, namely packages that depend on rgl, I install all these packages:

    sudo zypper install libpng12-devel xorg-x11-libs freeglut-devel gcc gcc-fortran gcc-c++ make r-base r-base-devel