AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / ubuntu / Perguntas / 1367607
Accepted
N0rbert
N0rbert
Asked: 2021-10-06 11:49:58 +0800 CST2021-10-06 11:49:58 +0800 CST 2021-10-06 11:49:58 +0800 CST

É possível evitar conflitos de pacotes R ao atualizar o Ubuntu 16.04 LTS com R do CRAN para o Ubuntu 18.04 LTS?

  • 772

Eu atualizei totalmente o Ubuntu 16.04.7 LTS amd64 que foi configurado para RMarkdown/bookdown, publicação LaTeX usando os seguintes comandos:

sudo apt-get install apt-transport-https

cat <<EOF | sudo tee /etc/apt/sources.list.d/r-cran.list
deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
EOF
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

sudo apt-get update

sudo apt-get install -y r-base-dev libssl-dev libjpeg62 libgstreamer0.10-0 libgstreamer-plugins-base0.10-0 calibre
sudo apt-get install -y biber texlive-lang-cyrillic fonts-cmu texlive-xetex texlive-fonts-extra texlive-math-extra font-manager ttf-mscorefonts-installer lmodern
sudo apt-get install -y build-essential libcurl4-openssl-dev libxml2-dev libcairo2-dev git

wget https://github.com/jgm/pandoc/releases/download/2.11.4/pandoc-2.11.4-1-amd64.deb -O /tmp/pandoc.deb
sudo apt-get install -y /tmp/pandoc.deb

wget -c https://download1.rstudio.org/desktop/xenial/amd64/rstudio-1.4.1106-amd64.deb -O /tmp/rstudio.deb
sudo apt-get install -y /tmp/rstudio.deb

mkdir -p ~/R/x86_64-pc-linux-gnu-library/3.4
R -e "install.packages(c('bookdown','tikzDevice','xaringan'), repos='http://cran.rstudio.com/', lib='/home/$USER/R/x86_64-pc-linux-gnu-library/3.4')"

Isso significa que /etc/apt/sources.list /etc/apt/sources.list.d/*.listcontém as seguintes linhas:

$ grep ^deb -r /etc/apt/ --include=*.list
/etc/apt/sources.list.d/r-cran.list:deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ xenial main restricted
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ xenial universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ xenial multiverse
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ xenial-updates multiverse
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu xenial-security multiverse

e este sistema tem o seguinte conjunto de pacotes R:

$ dpkg -l | grep "^ii  r-"
ii  r-base                                3.4.4-1xenial0                                  all          GNU R statistical computation and graphics system
ii  r-base-core                           3.4.4-1xenial0                                  amd64        GNU R core of statistical computation and graphics system
ii  r-base-dev                            3.4.4-1xenial0                                  all          GNU R installation of auxiliary GNU R packages
ii  r-base-html                           3.4.4-1xenial0                                  all          GNU R html docs for statistical computing system functions
ii  r-cran-boot                           1.3-20-1xenial0                                 all          GNU R package for bootstrapping functions from Davison and Hinkley
ii  r-cran-class                          7.3-14-2xenial0                                 amd64        GNU R package for classification
ii  r-cran-cluster                        2.0.7-1-1xenial0                                amd64        GNU R package for cluster analysis by Rousseeuw et al
ii  r-cran-codetools                      0.2-15-1cran1xenial0                            all          GNU R package "Code Analysis Tools for R"
ii  r-cran-foreign                        0.8.70-1xenial0                                 amd64        GNU R package to read/write data from other stat. systems
ii  r-cran-kernsmooth                     2.23-15-3xenial0                                amd64        GNU R package for kernel smoothing and density estimation
ii  r-cran-lattice                        0.20-38-1cran1xenial0                           amd64        GNU R package "Trellis Graphics for R"
ii  r-cran-mass                           7.3-50-1xenial0                                 amd64        GNU R package of Venables and Ripley's MASS
ii  r-cran-matrix                         1.2-14-1xenial0                                 amd64        GNU R package of classes for dense and sparse matrices
ii  r-cran-mgcv                           1.8-28-1cran1xenial0                            amd64        GNU R package "Mixed GAM Computation Vehicle with
ii  r-cran-nlme                           3.1.137-1xenial0                                amd64        GNU R package for (non-)linear mixed effects models
ii  r-cran-nnet                           7.3-12-2xenial0                                 amd64        GNU R package for feed-forward neural networks
ii  r-cran-rpart                          4.1-15-1cran1xenial0                            amd64        GNU R package "Recursive Partitioning and Regression
ii  r-cran-spatial                        7.3-11-1xenial0                                 amd64        GNU R package for spatial statistics
ii  r-cran-survival                       2.44-1.1-1cran1xenial0                          amd64        GNU R package "Survival Analysis"
ii  r-doc-html                            3.4.4-1xenial0                                  all          GNU R html manuals for statistical computing system
ii  r-recommended                         3.4.4-1xenial0                                  all          GNU R collection of recommended packages [metapackage]

Pela experiência anterior, sei que alguns dos pacotes R são mais recentes que as versões do repositório oficial do Ubuntu 18.04.6 LTS.

Como devo atualizar este Ubuntu 16.04.7 LTS para o Ubuntu 18.04.6 LTS corretamente nesta situação?

16.04
  • 1 1 respostas
  • 194 Views

1 respostas

  • Voted
  1. Best Answer
    N0rbert
    2021-10-06T11:49:58+08:002021-10-06T11:49:58+08:00

    Para executar o processo de atualização do Ubuntu 16.04.7 LTS com R 3.4 do CRAN perfeitamente, deve-se fazer o seguinte:

    1. Faça backup de uma lista de pacotes R instalados

      dpkg -l | grep "^ii  r-" | awk '{print $2}' > ~/r-debs.txt
      
    2. Remova o arquivo de fontes CRAN r-cran.listAPT por

      sudo rm /etc/apt/sources.list.d/r-cran.list
      
    3. Remover pacotes R

      sudo apt-get autoremove $(cat r-debs.txt) --purge
      
    4. Instale os pacotes R de volta usando versões de repositórios oficiais

      sudo apt-get install $(cat r-debs.txt)
      
    5. Instale as atualizações possíveis

      sudo apt-get update
      sudo apt-get dist-upgrade
      

      depois reinicie.

    6. Atualize o Ubuntu como de costume usando sudo do-release-upgradeou update-manager -c.

    7. Atualize o RStudio usando o comando abaixo:

      wget -c https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1717-amd64.deb -O /tmp/rstudio.deb
      sudo apt-get install -y /tmp/rstudio.deb
      

    O sistema Ubuntu 18.04.6 LTS resultante terá o R 3.4 totalmente funcional do repositório oficial.

    • 1

relate perguntas

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve