[Topic DIscussion] R和R studio在deepin怎样成功安装? Resolved
Tofloor
poster avatar
pho
deepin
2023-12-12 19:59
Author

之前的版本安装没有问题,但最近重装系统后,就安装有问题。

问题一:安装比较旧的版本

步骤一:命令1

sudo apt update

步骤二:命令2

sudo apt install r-base r-base-dev

步骤三:安装Rstudio
官网下载deb格式文件安装

安装完成后,运行R studio,可以运行,但不能在线安装包,会提示缺依赖。

问题二,安装较新的版本

从服务器安装https://docs.posit.co/resources/install-r/#specify-r-version

安装说明在这里:https://docs.posit.co/resources/install-r/#download-and-install-r

sudo apt-get update 
sudo apt-get install gdebi-core

查看debian版本

cat /etc/debian_version

选择软件版本

export R_VERSION=4.3.2

下载和安装R

$  curl -O https://cdn.rstudio.com/r/debian-10/pkgs/r-${R_VERSION}_1_amd64.deb

$ sudo gdebi r-${R_VERSION}_1_amd64.deb

确认R安装

/opt/R/${R_VERSION}/bin/R --version

结果显示为:

Light@Light-PC:~$ /opt/R/${R_VERSION}/bin/R --version
R version 4.3.2 (2023-10-31) -- "Eye Holes"
Copyright (C) 2023 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 the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

创建软连接

$ sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R

$ sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript

这时运行R studio会提示以下:

/usr/lib/rstudio/resources/app/bin/rsession: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

截图_选择区域_20231212115827.png

请问一下,以上问题如何解决?有类似安装成功的流程吗?

说明:计算机为deepin20.9系统,重新安装后,升级到最新后安装遇到的问题。

Reply Favorite View the author
All Replies
pho
deepin
2023-12-12 20:30
#1

补充,由于从R studio不能进入,我尝试用PYCHARM安装R插件,但是进入,安装ggplot2包,提示缺依赖:

提示还安装相依关系:‘colorspace’, ‘utf8’, ‘farver’, ‘labeling’, ‘munsell’, ‘R6’, ‘RColorBrewer’, ‘viridisLite’, ‘fansi’, ‘magrittr’, ‘pillar’, ‘pkgconfig’, ‘cli’, ‘glue’, ‘gtable’, ‘isoband’, ‘lifecycle’, ‘rlang’, ‘scales’, ‘tibble’, ‘vctrs’, ‘withr’

这些依赖安装后,在pycharm中能安装ggplot2等包,但是R studio运行还是同样提示上一楼中的错误。

Reply View the author
爱开发
deepin
2023-12-12 20:54
#2

libssl 库升级了吧,尝试安装下看看。这个问题论坛内经常有见到。

问下文心一言看看,这是常见问题。

Reply View the author
fallingstar-ten
deepin
2023-12-13 01:13
#3

R可以自己编译,rstudio选择对应的安装包就行,更直接的方法是拉取部署一个docker/podman容器,rocker系列随便选就行。

Reply View the author
leo
deepin
2023-12-13 08:52
#4

所以 是没有spss吗

Reply View the author
pho
deepin
2023-12-13 16:25
#5
leo

所以 是没有spss吗

安装SPSS也比较复杂,我只想要正版,无版权问题的。

Reply View the author
pho
deepin
2023-12-13 16:30
#6
爱开发

libssl 库升级了吧,尝试安装下看看。这个问题论坛内经常有见到。

问下文心一言看看,这是常见问题。

已经试过文心一言了

Light@Light-PC:~$ sudo apt-get install libssl3
请输入密码:
验证成功
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
没有可用的软件包 libssl3,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到

E: 软件包 libssl3 没有可安装候选

Reply View the author
爱开发
deepin
2023-12-13 18:33
#7
pho

已经试过文心一言了

Light@Light-PC:~$ sudo apt-get install libssl3
请输入密码:
验证成功
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
没有可用的软件包 libssl3,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到

E: 软件包 libssl3 没有可安装候选

关键词加了么?限制说 debian 12,没有 libssl 1.1 的库了

Reply View the author
pho
deepin
2023-12-13 22:07
#8
爱开发

关键词加了么?限制说 debian 12,没有 libssl 1.1 的库了

什么关键词?deepin20.9对应debian10.10

Reply View the author
爱开发
deepin
2023-12-14 03:34
#9

下载回来装看看。我没尝试过,我是 23

https://packages.debian.org/en/bullseye/libssl1.1

有网站说,可以用命令行。

sudo apt -y install libssl1.1
Reply View the author
pho
deepin
2023-12-14 06:22
#10
爱开发

下载回来装看看。我没尝试过,我是 23

https://packages.debian.org/en/bullseye/libssl1.1

有网站说,可以用命令行。

sudo apt -y install libssl1.1

Light@Light-PC:~$ sudo apt -y install libssl1.1
请输入密码:
验证成功
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
libssl1.1 已经是最新版 (1.1.1d.17-deepin1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。

我电脑里面已经是最新版了

Reply View the author
pho
deepin
2023-12-14 07:29
#11

我找到解决办法了。成功安装解决。

Reply View the author
老陈
deepin
2023-12-15 02:20
#12

Rstudio版本太高,降低版本即可

Reply View the author
pho
deepin
2023-12-15 05:45
#13
老陈

Rstudio版本太高,降低版本即可

解决办法我写了一篇博客在csdn上了。

Reply View the author