我在Debian Stretch中安装了R程序3.3.3。但是,我无法在R中安装tidyverse。
当我安装R 3.5时,我还有其他问题:Rstudio无法启动。如何解决这个问题呢?我已经这样做了几天,请帮帮我。
我的实际版本
R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 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.
Natural language support but running in an English locale
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.
当我安装tidyverse时
> install.packages("tidyverse")
Installing package into ‘/home/init5/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘reprex’
trying URL 'https://cran.rstudio.com/src/contrib/reprex_0.2.1.tar.gz'
Content type 'application/x-gzip' length 1029128 bytes (1005 KB)
==================================================
downloaded 1005 KB
trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.2.1.tar.gz'
Content type 'application/x-gzip' length 61647 bytes (60 KB)
==================================================
downloaded 60 KB
* installing *source* package ‘reprex’ ...
** package ‘reprex’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/fs/libs/fs.so':
/usr/local/lib/R/site-library/fs/libs/fs.so: undefined symbol: R_ContinueUnwind
ERROR: lazy loading failed for package ‘reprex’
* removing ‘/home/init5/R/x86_64-pc-linux-gnu-library/3.3/reprex’
Warning in install.packages :
installation of package ‘reprex’ had non-zero exit status
ERROR: dependency ‘reprex’ is not available for package ‘tidyverse’
* removing ‘/home/init5/R/x86_64-pc-linux-gnu-library/3.3/tidyverse’
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpUEkqMF/downloaded_packages’
Warning message:
In yaml::yaml.load_file(templateYaml) :
bytecode version mismatch; using eval`
当我安装reprex时显示此
> install.packages ("reprex")
Installing package into ‘/home/init5/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/reprex_0.2.1.tar.gz'
Content type 'application/x-gzip' length 1029128 bytes (1005 KB)
==================================================
downloaded 1005 KB
* installing *source* package ‘reprex’ ...
** package ‘reprex’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/fs/libs/fs.so':
/usr/local/lib/R/site-library/fs/libs/fs.so: undefined symbol: R_ContinueUnwind
ERROR: lazy loading failed for package ‘reprex’
* removing ‘/home/init5/R/x86_64-pc-linux-gnu-library/3.3/reprex’
Warning in install.packages :
installation of package ‘reprex’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpUEkqMF/downloaded_packages’
答案 0 :(得分:0)
经过几天的尝试,我的经验是: 第一。在R
之内lubricate
,Rcurl
和swirl
(成功安装)。我尝试安装libcurl
失败警告消息:软件包“ libcurl”不可用(对于R版本 3.3.3)
install.packages("tidyverse")
并显示了以下内容警告消息: 1:在install.packages(“ tidyverse”)中:安装软件包“ reprex”的退出状态为非零。 2:在install.packages(“ tidyverse”)中:安装软件包“ tidyverse”的退出状态为非零
options(download.file.method = "wget")
和install.packages(, method="curl")
警告消息: 1:在install.packages(,method =“ curl”)中: 安装软件包“ reprex”的退出状态为非零 2:在install.packages(,method =“ curl”)中: 安装软件包“ tidyverse”的退出状态为非零
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg:密钥4359ED62E084DAB9:导入的公用密钥“完全合法签名密钥” gpg:密钥51716619E084DAB9:导入的公共密钥“ Michael Rutter” gpg:处理的总数:2 gpg:导入的:2
root@debian:/home/init5#gpg -a --export E084DAB9 | sudo apt-key add -
好
root@debian:/home/init5# exit
退出
最后,我未能成功使用以下代码来安装tidyverse
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
此后,我认为这些步骤是基本步骤。以超级用户身份运行以下代码
一种。 sudo apt-get remove r-base-core
b。 sudo add-apt-repository "deb http://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -sc)/"
C。 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
d。 sudo add-apt-repository ppa:marutter/rdev
e。 sudo apt-get update
F。 sudo apt-get upgrade
G。 sudo apt-get install r-base
H。 rm -rf /usr/local/lib/R
然后我去了Rstudio并使用了install.packages("tidyverse")
。
完成(tidyverse)