我在 AWS 上启动了一个实例,使用的是 Ubuntu Server 16.04 LTS。该实例是新的,我从启动时只使用了以下命令;
首先,我使用 apt-get update 并创建了一个用户名
sudo apt-get update
sudo apt-get upgrade
sudo adduser <username>
接下来我安装了 R,使用
sudo nano /etc/apt/sources.list
我在列表最后添加了以下一行:
deb http://cran.rstudio.com/bin/linux/ubuntu trusty/
然后我安装 R,使用:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9
sudo apt-get update
sudo apt-get install r-base
最后我安装 R studio 服务器,使用:
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-1.0.153-amd64.deb
sudo gdebi rstudio-server-1.0.153-amd64.deb
R 安装正确,我可以输入命令“R”并使用它。但 RStudio Server 未安装。我收到以下消息:
ubuntu@ip-172-31-25-89:~$ sudo gdebi rstudio-server-1.0.153-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
RStudio Server
RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, and workspace management.
Do you want to install the software package? [y/N]:y
(Reading database ... 64867 files and directories currently installed.)
Preparing to unpack rstudio-server-1.0.153-amd64.deb ...
Unpacking rstudio-server (1.0.153) over (1.0.153) ...
Setting up rstudio-server (1.0.153) ...
useradd: user 'rstudio-server' already exists
groupadd: group 'rstudio-server' already exists
因此它显示“rstudio-server 已存在”,这很奇怪,因为我刚刚启动了这个实例,除了上面提到的之外没有做任何其他事情。我再次尝试使用不同版本的 R studio 服务器(在另一个实例上),但遇到了同样的问题。有什么建议吗?