I am working on a Redhat 7 linux server and utilizing an extremely old version of R (3.0.3 to be exact). I had to install this version of R from a source file.

I properly configured the Renviron file to point towards a location where I installed old R packages. Thus, when I use R it points to:


When I run

Rscript /path/to/some/script.R

or something similar the scripts run fine. All packages can be loaded and used as expected.

However when I open the R shell and use the command

rbatch("some/path/to/file", seed=i, universes= somevalue)

I receive an error that says

R --vanilla --args seed 1 universes SA < path/to/script > /path/to/some/*.Rout1

Error: package or namespace load failed for 'package':
package 'package' was installed by an R version with different internals; it needs to be reinstalled for use with this R version.

I reinstalled the same package multiple times (utilized R CMD, install.libraries(), and drag and drop from older server) in both libraries that R points to. I verified that the package was of the right version number, and I was even able to load the packages from the R shell.

I suspect this is an RHEL issue because this whole process runs fine on older operating system (rh6), so I wanted to see if anyone has any ideas on how to troubleshoot this outside what I have already done. Thanks.

  • The error message tells you about a version mismatch somewhere. Are you sure you didn't install R from the distribution? Is some other version around? – vonbrand Jul 3 '19 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.