RStudio Install – Install RStudio: ‘rstudio-server’ Already Exists

r

I wanted to update RStudio, I uninstalled the version that I had and followed these commands to install the newest version.

sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-0.99.896-amd64.deb
sudo gdebi rstudio-server-0.99.896-amd64.deb

I get this result:

Do you want to install the software package? [y/N]:y
Selecting previously unselected package rstudio-server.
(Reading database ... 801638 files and directories currently installed.)
Preparing to unpack rstudio-server-0.99.896-amd64.deb ...
Unpacking rstudio-server (0.99.896) ...
Setting up rstudio-server (0.99.896) ...
useradd: user 'rstudio-server' already exists
groupadd: group 'rstudio-server' already exists
rsession: no process found
rstudio-server stop/waiting
rstudio-server start/running, process 3793

I tried following the advice on this webpage:
https://support.rstudio.com/hc/en-us/articles/200717193-RStudio-Server-Will-Not-Start
and I disabled the RStudio AppArmor with

sudo ln -s /etc/apparmor.d/rstudio-server /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/rstudio-server

I also tried:

sudo apt-get --purge remove rstudio-server

and then installing it but that didn't work. I think that I shouldn't have done that because now I can't even install an older version of RStudio from Ubuntu Software Centre.

I right clicked on the rstudio-server-0.99.896-amd64.deb file that I downloaded and opened it through the Ubuntu Software Centre. It was, in fact, already installed. I reinstalled it but that had no effect. Does that mean I have rstudio-server but the IDE doesn't work?

I've looked in the /etc/rstudio directory and found two files; rserver.conf and rsession.conf. Both are empty except for the comment line at the top.

Best Answer

You had previously installed it so the rstudio-server user had been previously created.

If you are trying to install Rstudio desktop, use

wget https://download1.rstudio.org/rstudio-0.99.896-amd64.deb
sudo gdebi rstudio-0.99.896-amd64.deb.
Related Question