Package ‘#####’ was installed before R 4.0.0: please re-install it
1
0
Entering edit mode
Rafael • 0
@rafael-24147
Last seen 3.4 years ago

Hi guys, I'am trying to run a DE analysis for my PhD thesis. Trying to install 'DeSeq2' package in Rstudio server (Ubuntu 18.04.4 LTS). After update version 3.6 to 4.0, I am having several error messages when installing new packages. The messages is always something like "Package ‘#####’ was installed before R 4.0.0: please re-install it". I tried to add a new path to the new version 4.0, as shown in the output and sessionInfo(). When I tried to install Biocmanager again, I have the same massage "...please re-install it", after chosse "a" to update all packages.

Can someone help me?

'

> .libPaths()
    [1] "/home/XXXX/R/x86_64-pc-linux-gnu-library/4.0"
    [2] "/home/XXXX/R/x86_64-pc-linux-gnu-library/3.6"
    [3] "/usr/local/lib/R/site-library"                   
    [4] "/usr/lib/R/site-library"                         
    [5] "/usr/lib/R/library"                              

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] BiocManager_1.30.10

loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3    grid_4.0.3

> if (!requireNamespace("BiocManager", quietly = TRUE))
+   install.packages("BiocManager")
> BiocManager::install(version = "3.12")
Bioconductor version 3.12 (BiocManager 1.30.10), R 4.0.3 (2020-10-10)
Installation path not writeable, unable to update packages: foreign, spatial
Old packages: 'AnnotationDbi', 'BiocFileCache', 'biomaRt', 'Biostrings', 'GenomicFeatures',
  'lubridate', 'recipes', 'Rsamtools', 'Rsubread', 'waldo'
Update all/some/none? [a/s/n]:
Bioconductor RNASeqData DESeq2 Rsubread • 7.3k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 hour ago
United States

You shouldn't point to the old 3.6 library dir, because, well, it's from an old version of R. Do you have something like a .Renviron that is setting all those library paths? By default you should only have the site-wide library (and why are there three of them?) and your personal library path. So that's the first thing to fix. Without knowing your setup it's difficult to say much more than that.

Then my usual go-to move is to do something like

library(BiocManager)
z <- dir("/home/XXXX/R/x86_64-pc-linux-gnu-library/3.6")
install(z, ask = FALSE)

Which will then replicate what you had for R-3.6 in your new R-4.0 library dir.

ADD COMMENT
0
Entering edit mode

Hello James W. MacDonald !

I don't know what is a ".Renviron" and I don't know why I have 3 paths. How can I fix it?

When you said "setup", do you mean the server specs? What can I inform to help?

I tried to do what you said "z=dir..." but the same thing happened...

Thanks!

ADD REPLY
0
Entering edit mode

Well, the best way to find out what a .Renviron is would be to do a search. I just did one and there were a gazillion hits of people saying what they are and how you use them and all that stuff. That's really the best way to proceed; it's way faster than asking on a support site, and quite frankly that's the only way IMO that you will ever get even reasonably proficient with R.

Anyway, I work in a core facility and often need to use old versions of R to re-run old analyses where the collaborator doesn't want anything to change. So I have this in my .Renviron

$ cat .Renviron
## Note that this requires usage of different minor versions to differentiate between
## Bioc releases that are based on the same R version (e.g., use R-3.6.0 for BioC-3.9
## and R-3.6.1 for BioC-3.10)

R_LIBS_USER=/share/groups/edge/R/R-%V

And I am careful to use particular versions of R for particular versions of Bioconductor. So R-3.6.0 was for Bioc3.9, and R-3.6.1 was for Bioc3.10, and R-4.0.0 was for Bioc3.11, and R-4.0.2 is for the current release. Otherwise this paradigm won't work. And our sysadmin is nice enough to make symbolic links to the various installed R versions (how that might be helpful if you use Rstudio is unknown to me - I use emacs and ESS like God intended ;-D). Anyway in practice it looks like this:

$ ls /share/groups/edge/R
R-3.6.0  R-3.6.1  R-4.0.0  R-4.0.2

## and for each version of R:
$ R-3.6.0

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"

> .libPaths()
[1] "/share/groups/edge/R/R-3.6.0"
[2] "/share/apps/R/R-3.6.0/lib64/R/library"

$ R-3.6.1

R version 3.6.1 (2019-07-05) -- "Action of the Toes"

> .libPaths()
[1] "/share/groups/edge/R/R-3.6.1"
[2] "/share/apps/R/R-3.6.1/lib64/R/library"

$ R-4.0.0

R version 4.0.0 (2020-04-24) -- "Arbor Day"


> .libPaths()
[1] "/share/groups/edge/R/R-4.0.0"
[2] "/share/apps/R/R-4.0.0/lib64/R/library"

$ R

R version 4.0.2 (2020-06-22) -- "Taking Off Again"


> .libPaths()
[1] "/share/groups/edge/R/R-4.0.2"
[2] "/share/apps/R/R-4.0.2/lib64/R/library"

You can also read the BiocManager vignette for more ideas.

ADD REPLY

Login before adding your answer.

Traffic: 835 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6