0

when trying to install a package:

> install.packages("mlr")
Installing package into ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  dependencies ‘plyr’, ‘dplyr’, ‘lazyeval’ are not available
also installing the dependencies ‘scales’, ‘ggplot2’, ‘ggvis’, ‘reshape2’

trying URL 'http://cran.rstudio.com/src/contrib/scales_0.2.5.tar.gz'
Content type 'application/x-gzip' length 56346 bytes (55 Kb)
opened URL
==================================================
downloaded 55 Kb

trying URL 'http://cran.rstudio.com/src/contrib/ggplot2_1.0.1.tar.gz'
Content type 'application/x-gzip' length 2351203 bytes (2.2 Mb)
opened URL
==================================================
downloaded 2.2 Mb

trying URL 'http://cran.rstudio.com/src/contrib/ggvis_0.4.2.tar.gz'
Content type 'application/x-gzip' length 728345 bytes (711 Kb)
opened URL
==================================================
downloaded 711 Kb

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

trying URL 'http://cran.rstudio.com/src/contrib/mlr_2.4.tar.gz'
Content type 'application/x-gzip' length 440988 bytes (430 Kb)
opened URL
==================================================
downloaded 430 Kb

ERROR: dependency ‘plyr’ is not available for package ‘scales’
* removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/scales’
Warning in install.packages :
  installation of package ‘scales’ had non-zero exit status
ERROR: dependencies ‘dplyr’, ‘lazyeval’ are not available for package ‘ggvis’
* removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/ggvis’
Warning in install.packages :
  installation of package ‘ggvis’ had non-zero exit status
ERROR: dependency ‘plyr’ is not available for package ‘reshape2’
* removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/reshape2’
Warning in install.packages :
  installation of package ‘reshape2’ had non-zero exit status
ERROR: dependencies ‘plyr’, ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/ggplot2’
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependencies ‘ggplot2’, ‘ggvis’, ‘plyr’, ‘reshape2’ are not available for package ‘mlr’
  • removing ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0/mlr’ Warning in install.packages : installation of package ‘mlr’ had non-zero exit status

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

I keep getting th eerror" warning in install.packages insallation of package ... had non zero exit status.

What am I doing wrong? How do I Install MLR?

smci
  • 32,567
  • 20
  • 113
  • 146
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
  • 1
    Try installing ‘plyr’, ‘dplyr’, ‘lazyeval’ before installing mlr. – user227710 Jun 28 '15 at 20:31
  • 1
    > install.packages('plyr') Installing package into ‘/home/kisco/R/x86_64-pc-linux-gnu-library/3.0’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘plyr’ is not available (for R version 3.0.2) – Alex Gordon Jun 28 '15 at 20:31
  • I had an error installing 'plyr' today too. Try restarting R/Rstudio, it worked for me. – RHA Jun 28 '15 at 20:32
  • I would try to narrow down the source of the error by installing the dependencies individually, `plyr`, `dplyr`, `ggplot2` etc. and see if they all lead to the same error or if some of them can be installed. – RHertel Jun 28 '15 at 20:32
  • 3
    How about an update of `R`? The latest release is `R-3.2.1`. – RHertel Jun 28 '15 at 20:36
  • I was able to install it on a Windows machine today, but I had to install Package `stringi` first and then answer `n` when asked: `Do you want to install from sources the package which needs compilation?` regarding package `stringi`. – Mark Miller Jun 28 '15 at 20:38
  • @RHertel r-base is already the newest version. The following packages were automatically installed and are no longer required: linux-headers-3.16.0-30 linux-headers-3.16.0-30-generic linux-image-3.16.0-30-generic linux-image-extra-3.16.0-30-generic Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. kisco@kisco:~$ – Alex Gordon Jun 28 '15 at 20:39
  • i also get very weird output when trying to install stringi http://storage1.static.itmages.com/i/15/0628/h_1435524175_1078795_34c279d3fe.png – Alex Gordon Jun 28 '15 at 20:42
  • 1
    According to your error message you're using `R`version 3.0.2. I think that an update to R- 3.2.1 following the instructions on http://cran.r-project.org/ might help. The version that you obtain with apt-get is not necessarily the most recent one. – RHertel Jun 28 '15 at 20:43
  • Package `stringi` was updated today, or at least its documentation was updated today. Perhaps an error was created in the process of the update. – Mark Miller Jun 28 '15 at 20:50
  • the stringi messages are not errors, it is output of your g++ compiler making the package. – jeremycg Jun 28 '15 at 20:52

1 Answers1

6

You have an outdated version of R. Normally dplyr and your other dependencies would be automatically installed, but in this case they are labelled as not working with older versions of R, so throw an error.

You have version 3.0.2, which is out of date. As of now the current version is 3.2.1. You should upgrade (you don't have the most up to date version of r-base, repos are often behind - try getting the binary from here).

If you don't want to update you can use the methods described in answers to this question to install older versions of the packages which may be compatible with your version - install older version of R package.

Community
  • 1
  • 1
jeremycg
  • 24,657
  • 5
  • 63
  • 74
  • thanks! in addition to your suggestion i also had to do this: http://stackoverflow.com/a/10260634/117700 – Alex Gordon Jun 28 '15 at 21:06
  • however, i still dont understand what this jumbo is n -Iicu55/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -UDEBUG -DNDEBUG -DU_HAVE_ELF_H -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c stri_brkiter.cpp -o stri_brkiter.o g++ -std=c++11 -I/usr/share/R/include -DNDEBUG -I. -Iicu55 -Iicu55/ – Alex Gordon Jun 28 '15 at 21:07
  • 1
    Some packages are compiled from source upon install (mostly when using c++ code through Rcpp), and you get the compiler output in your console. If it isn't an error, you can usually safely ignore it. – jeremycg Jun 29 '15 at 19:34