$ R

R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> 

R 버전 3.4.4 사용 중, 

새로운 라이브러리 설치가 되지 않아 전체 우분투 update 를 시도하였으나 에러가 발생.

 

 

> install.packages('httr')
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages("httr") :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead?  (y/n) 
Would you like to create a personal library
~/R/x86_64-pc-linux-gnu-library/3.4

 

 

R-project 의 cran 주소 에러로 우분투 업데이트 불가시,

아래와 같은 메시지가 나올 수 있다.

 

$sudo apt update
Ign:1 http://linux.dropbox.com/ubuntu bionic InRelease
Get:2 http://linux.dropbox.com/ubuntu bionic Release [6,600 B]                 
Get:4 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease [3,626 B]
Err:4 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease    
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]    
Hit:6 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease    
Hit:7 http://archive.ubuntu.com/ubuntu bionic InRelease                        
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]      
Get:9 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42.1 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [40.6 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:12 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]   
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [273 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [303 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:16 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7,972 B]
Reading package lists... Done                                                
W: GPG error: https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

 

R-project 의 cran 주소 에러로 우분투 업데이트 불가시,

 

 

 

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'

위와 같이 먼저 cran 주소를 변경해주고,

 

sudo apt-get install r-base-core

다시 R 을 설치해주면,

기존의 R을 삭제하고 알아서 4.0 버전의 R 을 재설치 해준다.

 

$ R

R version 4.0.0 (2020-04-24) -- "Arbor Day"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> 

 

 

 

 

 

출처 : linuxize.com/post/how-to-install-r-on-ubuntu-18-04/

 

How to Install R on Ubuntu 18.04

R is a fast growing open-source programming language and free environment that specializes in statistical computing and graphics representation. This tutorial will guide you through the steps of installing R on an Ubuntu 18.04 machine.

linuxize.com

 

반응형

+ Recent posts