Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIscBIO doesn't install #21

Closed
wleoncio opened this issue Oct 6, 2020 · 1 comment
Closed

DIscBIO doesn't install #21

wleoncio opened this issue Oct 6, 2020 · 1 comment
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@wleoncio
Copy link
Member

wleoncio commented Oct 6, 2020

Describe the bug

Installation of DIscBIO from CRAN fails.

Steps to Reproduce

From an R interactive session, run:

install.packages("DIscBIO")

Expected output

Output that ends in:

* DONE (DIscBIO)

The downloaded source packages are in/tmp/Rtmpgn8yf4/downloaded_packages

The name of the temporary directory, Rtmpgn8yf4, will probably be different in your case.

Obtained output

The downloaded source packages are in/tmp/Rtmpgn8yf4/downloaded_packagesWarning messages:
1: In install.packages("DIscBIO") :
  installation of packagerJavahad non-zero exit status
2: In install.packages("DIscBIO") :
  installation of packageRWekajarshad non-zero exit status
3: In install.packages("DIscBIO") :
  installation of packageRWekahad non-zero exit status
4: In install.packages("DIscBIO") :
  installation of packageDIscBIOhad non-zero exit status
@wleoncio wleoncio added the bug Something isn't working label Oct 6, 2020
@wleoncio wleoncio self-assigned this Oct 6, 2020
@wleoncio
Copy link
Member Author

wleoncio commented Oct 6, 2020

Explaining the error

This is common to all R packages dependent on rJava, which is often a PITA to install. If you try to install another such package, e.g. rcdk, a similar problem will occur.

This type of error usually happens because the user's R installation cannot properly see all Java paths. It is an Operating System problem, which CRAN has no control over and thus doesn't prevent a package from being published on CRAN.

How to solve the issue

It is up to the user to solve the issue for their Operating System, and sites like stackoverflow are full of posts relating the problem and proposing solutions. Also, taking a closer look at the full output will often lead to some proposals from R itself. For instance, on Linux (and maybe macOS) you should:

  1. Install openjdk (including sources, which may be in a separate package from the JRE)
  2. Run R CMD javareconf -e (or, alternatively, sudo R CMD javareconf) for R to search for the proper Java paths.
  3. If the previous step fails (often due to a failure in finding jni.h), run echo $JAVA_HOME to make sure the environment variable is pointing to a valid openjdk version
  4. Reload your R session

Once install.packages("rJava") runs successfully, you'll be able to install DIscBIO. If it doesn't, try closing and reopening R (so it picks up the proper Java paths). If you still run into problems, please post below.

@wleoncio wleoncio closed this as completed Oct 6, 2020
@wleoncio wleoncio pinned this issue Oct 6, 2020
@wleoncio wleoncio added the wontfix This will not be worked on label Oct 6, 2020
@wleoncio wleoncio unpinned this issue Mar 3, 2022
@wleoncio wleoncio pinned this issue Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant