1

I need to know how to install RJDBC 0.2.8 if my R version is 4.1.3. I made this before and it works perfectly, but when I try to do this again, this message appears:

Loading required package: DBI Loading required package: rJava Error: package or namespace load failed for ‘RJDBC’: package ‘RJDBC’ was installed before R 4.0.0: please re-install it

I tried uninstalling and installing again the package but it didn't work.

Thank you.

Note: Sorry. Actually, my question is about how can I make compatible the RJDBC library with my current R version. Because I can install it but I can't load it.

  • Of course, this works if I replace the RJDBC 0.2.8 with any of the newest versions. But I need that it works with the 0.2.8 version. – Binary Struggle Nov 08 '22 at 01:09

1 Answers1

1

First, remove, delete, uninstall any RJDBC versions on your system. Then use devtools to install a specific version

devtools::install_version("RJDBC", version = "0.2-8")

Archive source: https://cran.r-project.org/src/contrib/Archive/RJDBC/

Tested in R 4.2.1

sessionInfo()
# [1] RJDBC_0.2-8 
M.Viking
  • 5,067
  • 4
  • 17
  • 33
  • Thank you very much for the reply. Actually, my question is about how can I make compatible the RJDBC library with my current R version. Because I can install it but I can't load it. – Binary Struggle Nov 08 '22 at 02:20
  • 1
    You need to delete/remove/uninstall the one that was compiled under the old version first. then reinstall. I tested 0.2-8 in R 4.2.1 – M.Viking Nov 08 '22 at 02:37