Giter Site home page Giter Site logo

Comments (12)

eddelbuettel avatar eddelbuettel commented on July 17, 2024 1

You are mixing R 3.4.* and R 3.5.*. You need to be more careful about which repositories, and R versions, you are accessing. That is an error that is likely entirely entirely on your side.

from shiny.

Emelieh21 avatar Emelieh21 commented on July 17, 2024 1

@cboettig Thanks a lot for clarifying! Looking a bit deeper I see the stable r-cran-rjava came with R 3.2.3... I took apt-get install r-cran-rjava out now and replaced it with:

apt-get install -y default-jdk && \
apt-get install -y libicu-dev && \
apt-get install -y libbz2-dev && \
apt-get install liblzma-dev && \
R -e "install.packages('rJava')"  &&\

Stuff seems to look normal again :) Thanks again for the quick reactions from your side.

from shiny.

eddelbuettel avatar eddelbuettel commented on July 17, 2024 1

(You can combine those calls as

apt-get install -y default-jdk ibicu-dev libbz2-dev liblzma-dev && \
     R -e "install.packages('rJava')"  &&\

and of course line-break the packages. Another trick is install.r or install2.r

apt-get install -y default-jdk ibicu-dev libbz2-dev liblzma-dev && \
     install.r rJava  &&\

and both tricks are all over our Dockerfiles ...)

from shiny.

perrystephenson avatar perrystephenson commented on July 17, 2024 1

For anyone else landing on this page when trying to install rJava on the rocker images, the response from @eddelbuettel above has a typo: ibicu-dev should be libicu-dev.

Which means the final one-liner install should be something like:

apt-get install -y default-jdk ibicu-dev libbz2-dev liblzma-dev && install.r rJava

from shiny.

Emelieh21 avatar Emelieh21 commented on July 17, 2024

Thanks @eddelbuettel for the fast response! Maybe a stupid question, but how do you know I am mixing R3.4.* and R3.5.*? I didn't realize it, I am just using the same docker file as before.

from shiny.

eddelbuettel avatar eddelbuettel commented on July 17, 2024

Launch your container with bash and at the prompt do apt-cache policy r-base-core. You'll see where it comes from. Do the same with any package that goes belly up: apt-cache cache policy r-cran-curl (to name one).

There is no Docker bug here. You have an issue in your add-on work, so I will gently close this. If you find a reproducible issue from our side by all means please reopen and document.

from shiny.

cboettig avatar cboettig commented on July 17, 2024

@Emelieh21 Sorry, this is my fault. I've transitioned the shiny image to build on debian:stable rather than debian:testing (to align with RStudio and provide the versioned images that were requested). So indeed they are not the same images as ~ 1 month ago (see PR #24)

This approach does not play nicely with apt-get r-cran-* because in the versioned stack, R is installed from source. I recommend installing R packages directly from CRAN (e.g. the r-cran-rjava) or otherwise you'll pull in a copy of the older R that ships in debian:stable (at /usr/bin/R) in addition the the already installed latest R (at /usr/local/bin/R), which you probably don't want.

from shiny.

eddelbuettel avatar eddelbuettel commented on July 17, 2024

@cboettig Can you detail what you mean by r-cran-rjava? That is (again) a binary build and as such susceptible to mixing R 3.4.* and R 3.5.*. If you have backports in mind, point to the relevant URL and apt add-repo lines. Else say you meant install.packages("rJava") with all its dependency issues.

Maybe use Ubuntu LTS instead? We'd get the Rutter repo there.... Or stick with testing instead?

from shiny.

cboettig avatar cboettig commented on July 17, 2024

@eddelbuettel Right, @Emelieh21 's Dockerfile includes r-cran-rjava in the apt-get line above. It he changed it to install.packages("rJava") like you say (and handled the dependency issues, e.g. default-jdk) then I think the above problem mixing versions would go away.

I don't see how Ubuntu LTS would help.I'm not sure how to take a vanilla Debian or Ubuntu image, install the desired version of R from source only, and still have things so that users can apt-get install R binaries from anywhere. Any r-cran- binary is going to depend on the binary build of R and so it's going to install a second version of R into /usr/bin in addition to the one I installed manually from source at /usr/local/bin, right?

from shiny.

eddelbuettel avatar eddelbuettel commented on July 17, 2024

You can definitely mix-and-match 'R from source' with r-cran-* provided you use the same R version (or "newer than"). That is what everybody does who builds R from svn or git anyway -- it happily uses packages from anywhere in .libPaths() provided they come from a compatible version. There are times when you could not do that -- i.e. a year ago when what is now r-release was r-devel and was imposing a change to the then r-release. Right now we don't have that problem. And obviousy if you rebuild the same r-release from source you get the same r-release and they match.

Devil, as always, in the detail. Happy to take off-line and poke at particular Dockerfiles.

from shiny.

Emelieh21 avatar Emelieh21 commented on July 17, 2024

That does looks much nicer. Thanks for the tip :)

from shiny.

HarshGrandeur avatar HarshGrandeur commented on July 17, 2024

You must have upgraded to a newer version of R, but R did not automatically update packages. You first need to find packages with older version and update them.
Find the
new_packages <- installed.packages()
this will store all the package installed inside a data frame
convert into a dataframe
df <- as.data.frame(new_packages)
find older package versions , replace the list with packages which are of latest version and you dont want to update
D2 = subset(df, !(Built %in% c('4.0.0','4.0.2')))
D2 <- as.data.frame(D2)
Finally install the packages :
install.packages(D2$Package)

from shiny.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.