niedziela, 27 grudnia 2020

Aktualizacja R w Debian 10 (Buster)

R w Debianie (wersja 10) jest w wersji 3.5:

> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

other attached packages:
[1] rmarkdown_1.17 ggplot2_3.2.1  ggthemes_4.2.
Opis aktualizacji do wersji 4 jest tutaj. Trzeba dodać deb http://cloud.r-project.org/bin/linux/debian buster-cran40/ do /etc/apt/sources.list:
## https://cran.r-project.org/bin/linux/debian/#debian-buster-stable
## For a backport of R 4.0.1 to buster, please add
## deb http://cloud.r-project.org/bin/linux/debian buster-cran40/  
## /etc/apt/sources.list on your computer.
##
apt update

błąd...

## https://unix.stackexchange.com/questions/559977/not-able-to-install-latest-r-statistical-package-in-debian-stable
apt-key adv --keyserver keys.gnupg.net --recv-key FCAE2A0E115C3D8A
apt update
apt install -t buster-cran40 r-base

## Jako root
update.packages(lib.loc="/usr/local/lib/R/site-library", ask = FALSE,
  checkBuilt = TRUE, Ncpus = 16)

>  sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Wszystko działa do tej pory. Instaluję więcej pakietów:

install.packages("devtools")

Znowu błąd. Trzeba doinstalować pakiet libgit2-dev:

apt install libgit2-dev

install.packages("dplyr")
install.packages("tidyverse")
install.packages("ggthemes")
install.packages("bookdown")
install.packages("ggpubr")
install.packages("ggpubr")
install.packages("ggforce")
## or install.packages(c("ggpubr", "ggforce"))

Na sam koniec się okazuje, że pandoc (w wersji 2.2.1) stał się out-of-sync:

/usr/lib/rstudio/bin/pandoc/pandoc --version
pandoc 2.3.1
/usr/bin/pandoc --version
pandoc 2.2.1
## Po prostu
mv /usr/bin/pandoc /usr/bin/pandoc_2.2.1
ln -s /usr/lib/rstudio/bin/pandoc/pandoc /usr/bin/pandoc

2 komentarze: