项目场景:
在arch linux 上安装rstudio
过程记录:
首先更新一下源
sudo pacman -Syy
然后先安装r包,用pacman找了一下
pacman -Ss '^r$'
加正则主要是因为‘-Ss’ 中会有正则匹配规则。然后出来一堆你不需要的包淹没只有孤零零一个字母的r包
一路安装下去
成功安装后检验一下,应该能看到以下的样子
~ R
R version 4.0.4 (2021-02-15) -- "Lost Library Book"
Copyright (C) 2021 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.
> q()
Save workspace image? [y/n/c]: n
接下来就可以安装R的IDE Rstudio了,这里安装的不是服务器版本的,直接用pacman找找
pacman -Ss rstudio
得到这两个:
~ pacman -Ss rstudio
archlinuxcn/rstudio-desktop-bin 1.4.1103-1
An integrated development environment (IDE) for R (binary from RStudio official
repository)
archlinuxcn/rstudio-desktop-git 34529.d572b81809-1
A powerful and productive integrated development environment (IDE) for R
programming language
由于本鱼的输入法是qt5的,还是选了git那个
于是安装rstudio
sudo pacman -S rstudio-desktop-git
However 意外出现了
error: failed retrieving file 'rstudio-desktop-git-34529.d572b81809-1-x86_64.pkg.tar.zst' from repo.archlinuxcn.org : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.
看起来是由于网速慢导致timeout了,但让terminal走代理的方法提个速并不可行,查阅stackoverflow以后用如下方法解决:
sudo pacman -Syu --disable-download-timeout
耐心等待更新完毕,然后再次安装Rstudio,成功了