0

I am experiencing great difficulties in installing the package ranger. Here is the error message that I am getting:

ERROR: compilation failed for package ‘ranger’
* removing ‘/home/ibraim/R/x86_64-pc-linux-gnu-library/3.5/ranger’
Warning in install.packages :
installation of package ‘ranger’ had non-zero exit status

I also tried the installation by using devtools, which did not work. Do you have any suggestion how to solve this problem?

Kim
  • 4,080
  • 2
  • 30
  • 51
user249018
  • 505
  • 2
  • 5
  • 18
  • 2
    Do you have other R sessions that are open? This happens in Windows. Shut all R sessions, restart one session, and try `install.packages("ranger")` again. Do you still get errors? – Kim Apr 19 '19 at 21:09
  • The operating system I am using is LInux. I followed your suggestion though, but the error is persisting. – user249018 Apr 19 '19 at 21:12
  • 2
    Hmm, I see. Are there any other error messages than that? That itself is not very informative. Have you tried `dependencies=TRUE` as well? – Kim Apr 19 '19 at 21:18
  • I tried that too. But the same warning is showing up. – user249018 Apr 19 '19 at 21:32
  • Is there a way to install it "manually" ? Actually what I need is the installation of the packages paprbag and 4paprbag, which happend to be dependent on the package ranger. – user249018 Apr 19 '19 at 21:34
  • 1
    I had this issue with another package once and I could only solve it by updating to the latest R/Rstudio versions. Maybe it is worth a try? – JReddig Apr 19 '19 at 21:38
  • Thanks. I installed the latest version R 3.5.3 yesterday because of these reasons. It did not change anything. – user249018 Apr 19 '19 at 21:40
  • 1
    You are not getting any other warning messages such as gcc errors or whatever? Try editing the post with the entire error message. That can't be the only error message in most cases. I understand the frustration, but bear with us---FYI I was just able to install the `paprbag` package. – Kim Apr 19 '19 at 21:46
  • 2
    Try installing it from source: as outlined [here](https://stackoverflow.com/questions/1474081/how-do-i-install-an-r-package-from-source#1474125). CRAN link for `ranger` is [here](https://cran.r-project.org/web/packages/ranger/index.html). – Kim Apr 19 '19 at 21:52
  • Is the path_to_file in this case the URL ? I tried it as such getting an other error. – user249018 Apr 19 '19 at 22:11
  • 1
    @user249018 It means you have to download it in your local directory and point to it. Now, for the third time, if you have any other error messages than what you posted, let us know... otherwise there's very little we can do to help. :-o – Kim Apr 19 '19 at 23:19
  • @Kim Many thanks. It is a zip folder. After unzip I realized that there are many many folders inside including the one called R. Which one should I point to? I also downloaded similarly the two packages I need, paprbag and data 4paprbag. I will try to install them from source as well. – user249018 Apr 20 '19 at 05:59
  • @Kim Hier is what I get after trying to install the package from source: `Warning in install.packages : unable to access index for repository NULL/src/contrib: cannot open URL 'NULL/src/contrib/PACKAGES' Warning in install.packages : package ‘/home/Downloads/ranger-master.zip’ is not available (for R version 3.5.3)` – user249018 Apr 20 '19 at 07:57
  • @Kim Maybe it is also worth telling that I installed the 3.5.3 version of R following the advice from the Web page https://linuxize.com, since trying to install it from CRAN led each time into installing the 3.4.4 version and not the latest one. Do you think that what I have installed following the Web page above might be an incomplete R version? Thanks. – user249018 Apr 20 '19 at 10:47

0 Answers0