小白一枚,高手勿喷。经历了各种报错...终于debug出来了。分享下经验。
一开始没注意自己的镜像(Ubuntu 18.04 server 64bit),对的官网的代码一顿操作,发现各种bug,例如libc6:arm64 (>= 2.25) but it is not installable。debug半天都失败。
后来发现官网要求的镜像是Ubuntu 22或者20...于是想着升级镜像。
我是华为云租的服务器,可以在控制台升级镜像!但是注意备份,因为我发现升级以后文件都没了...(一开始没找到哪里可以升级,在服务器里升级,看了各种教程,遇到了各种bug...例如Some index files failed to download, they have been ignored, or old ones used instead;
Please install all available updates for your release before upgrading.debug全部失败...)
在华为云的控制台里升级镜像后,开始操作!
选择你的镜像的教程,按照官网代码一步步往下。
如果运行
“wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2023.09.1-494-amd64.deb”
提示网络错误下载不下来,可以点击
(https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2023.09.1-494-amd64.deb)手动下载这个文件,自己传到服务器上去。
随后丝滑安装。参考教程:在服务器中使用R--RStudio Server - 知乎
创建了自己的用户名,但是登录时报错了。
服务器中提示:
rserver[10096]: ERROR system error 13 (Permission denied) [user-value=<my username>]; OCCURRED AT: rstudio::core::Error rstudio::core::system::user::{anonymous}::userFrom(const boost::function<int(T, passwd*, char*, long unsigned int, passwd**)>&, T, rstudio::core::system::user::User*) [with T = const char*] /home/ubuntu/rstudio/src/cpp/core/system/PosixUser.cpp:107; LOGGED FROM: std::string rstudio::server::pam_auth::{anonymous}::userIdentifierToLocalUsername(const string&) /home/ubuntu/rstudio/src/cpp/server/ServerPAMAuth.cpp:175
Rstudio网页提示:
Unable to connect to service (1)
后参考教程:🧐 Rstudio Server | 手残党的Rstudio Server搭建教程!~(附踩坑经历) - 知乎
方案二:
systemctl stop firewalld.service
我的服务器运行不了。
随后进行了如下操作:
“要为自己建个home directory,不然的话会报错哦。
mkdir /home/abc
chown -R abc /home/abc”
终于可以跑起来了!