I converted to Ubuntu today, but have a problems launching R studio. I installed R through the command prompt like this:
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/">> /etc/apt/sources.list'
gpg -a --export E084DAB9 | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install r-base
I cheked if R was installed proper by typing R and then exiting by q(save="no").
I installed R studio through the command prompt by
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-0.99.902-amd64.deb
sudo gdebi rstudio-server-0.99.902-amd64.deb
But this doesn't work and i can't find the launch button or open R studio.
Afterwards i tried to remove it and install it through the website but doesn't work either. What should i do?
There is no lauch button -- you connect to port 8787 on the machine running RStudio Server.
In other words, type http://localhost:8787 in the address bar of your browser. You should see a login screen with the RStudio logo. This connects you to your RStudio Server.
If you want to run the Desktop version you need to install the other available .deb package.
For those on Ubuntu 16.10, or who prefer to use the desktop version of RStudio, you may wish to follow the solution posted by Mike Williamson reproduced below:
1) Get the latest R Studio Daily Build here, though note that it's not necessarily stable.
2) Install, chaning the name of the package to the one you downloaded - perhaps easiest if you go to your Downloads directory - and you'll probably find that there are missing packages:
$ sudo dpkg -i rstudio-1.0.124-amd64.deb
3) Download the missing packages (the lack of which causes the installation to fail):
$ wget http://ftp.ca.debian.org/debian/pool/main/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5_amd64.deb
$ wget http://ftp.ca.debian.org/debian/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
4) Install them:
$ sudo dpkg -i libgstreamer0.10-0_0.10.36-1.5_amd64.deb
$ sudo dpkg -i libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
5) Make sure they don't get over-written at the next software update:
$ sudo apt-mark hold libgstreamer-plugins-base0.10-0
$ sudo apt-mark hold libgstreamer0.10
6) Install RStudio (changing name to the version you downloaded):
sudo gdebi rstudio-1.1.5-amd64.deb
7) Launch RStudio:
rstudio
Related
Quite surprisingly it's hard to find a workable solution around this.
I have an EC2 instance launched with Ubuntu 18.04 distribution.
I do sudo-get install r-base but the installed R version is R3.4
I've followed the steps here below where it asks to edit the source.list file
https://cran.r-project.org/bin/linux/ubuntu/README.html#installation
However, AWS declines the update as the source link is not secured.
Have you made sure you succesfully added the public key to the system?
This has worked for me fine in EC2 Ubuntu 18.04 to update to R 3.6.1. I also followed instructions given in https://cran.r-project.org/bin/linux/ubuntu/README.html#installation.
First, add the public key in the documentation´s "Secure APT" section. Run this in terminal:
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
Next, add modify your file /etc/apt/source.list by entering this command:
$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
Once that is done, enter this command and double check if AWS has not declined the update
$ sudo apt update
Finally, run this to get updates installed
$ sudo apt install r-base r-base-dev
I found this resource to be very helpful:
https://www.charlesbordet.com/en/shiny-aws-3/#how-to-install-shiny-server
I ended up using AMI from this website
louisaslett.com/RStudio_AMI/
It has some pre-builts libraries and installations.
The problem:
I'm trying to install the devtools package for R. I'm using Ubuntu 18.04 LTS on WSL, the Windows Subsystem for Linux.
I'm able to install some packages just fine with a simple call to install.packages() from within R on WSL. However, other packages seem to give me trouble.
None of the following methods I've tried seem to work:
* I've tried installing the package with install.packages().
* I've tried installing from source into /usr/local/lib/R/site-library.
* I've tried installing from source into a personal library.
Error message:
I was recieving an error message like that discussed here, but I was unable to fix the problem by editing unpackPkgZip because it didn't exist.
The Question:
How can I install devtools on WSL?
Solution:
I was able to fix the problem by starting over. I uninstalled Ubuntu and then reinstalled it. With a fresh install of Ubuntu 18.04 I followed these instructions. There are other online tutorials which probably work just fine, but I followed this one. You can ignore the bit about installing an rstudio server and the fsl package if you wish.
# Install R on WSL
sudo apt-get update -qq -y
sudo apt-get install -y wget git
OS_DISTRIBUTION=$(lsb_release -cs)
wget -O- http://neuro.debian.net/lists/${OS_DISTRIBUTION}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
sudo apt-get update
sudo apt-get install libopenblas-base r-base
sudo apt-get update -qq -y
sudo apt-get install -y libgit2-dev
sudo apt-get install -y libcurl4-openssl-dev libssl-dev
sudo apt-get install -y zlib1g-dev libssh2-1-dev libpq-dev libxml2-dev
#sudo apt-get install -y libhdf5 # This didn't work.
Now try installing devtools in R.
# Install devtools
install.packages("devtools", repos = "https://cran.rstudio.com/")
Permission error:
If you encounter a permission error like the following...
Warning in install.packages("edgeR") :'lib = "/usr/local/lib/R/site-library"' is not writable Would you like to use a personal library instead? (y/n)
...you need to provide the user with write access to the directory where R packages are installed (see here). Try changing the group ownership of this directory:
# Who has ownership of /usr/local/lib/R/site-library/?
ls -l /usr/local/lib/R/
# drwxrwsr-x 1 root staff 512 Jul 18 21:38 site-library
# Change ownership.
sudo chgrp twesleyb /usr/local/lib/R/site-library/
ls -l /usr/local/lib/R/
#drwxrwxr-x 1 root twesleyb 512 Jul 18 21:38 site-library
# In this case I have write access, but in case you need to add it, try:
# $ sudo chmod g+w /usr/local/lib/R/site-library
You should now be able to install.packages("package").
I'm a linux novice, but I think this is an okay thing to do.
Update:
You can also try following duckmayr's instructions.
I use the command lines below to install:
$ sudo apt-get install r-base
$ sudo su - \
-c "R -e \"install.packages('shiny', repos='https://cran.rstudio.com/')\""
$ sudo apt-get install gdebi-core
$ wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-1.4.1.759-amd64.deb
$ sudo gdebi shiny-server-1.4.1.759-amd64.deb
Error message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: libssl0.9.8
Any ideas why?
I followed those command lines from the shiny website itself sometime ago. Now it has changed and failed to install with the current instructions. I have followed this guide too but no luck at all.
Any ideas?
I'm on ubuntu 16.04 now btw.
Use the last version of rstudio which use the last version lo libssl, which probably is installed in your system:
For that execute below commands:
64bit
$ sudo apt-get install gdebi-core
$ wget https://download2.rstudio.org/rstudio-server-1.1.383-amd64.deb
$ sudo gdebi rstudio-server-1.1.383-amd64.deb
32bit
$ sudo apt-get install gdebi-core
$ wget https://download2.rstudio.org/rstudio-server-1.1.383-i386.deb
$ sudo gdebi rstudio-server-1.1.383-i386.deb
For more info go to: https://www.rstudio.com/products/rstudio/download-server/
I also had this problem but was able to get around it by installing the most recent version of shiny server.
You can check to see if libssl0.9.8 is even installed:
dpkg --get-selections | grep ssl
Likely it is not (perhaps it is deprecated).
In the tutorial, it recommends you use the latest version of shiny-server. See if you can successfully install a more recent version.
$ sudo apt-get install gdebi-core
$ wget https://download3.rstudio.org/ubuntu-12.04/x86_64/shiny-server-<latest-version>-amd64.deb
$ sudo gdebi shiny-server-<latest-version>-amd64.deb
I'm working with docker since approximately a week and I don't understand some of the linking containers stuff.
I've downloaded from rocker, the latest images of Rstudio. It work nicely, everything is ok. I have one own made container with an old R version (let's say humm 3.1.0-1 for example). What I want to do is to use Rstudio from rocker with my own made R version. But this is where I don't understand. How it works ? Is it possible ? If I can do that that'll be awesome but I really don't understand how.
If someone have a solution, that'll be really great.
This is my dockerfile for my old R version :
#Get trusty version of ubuntu
FROM ubuntu:trusty
#We need to have https for cran
RUN apt-get -y update && apt-get -y install apt-transport-https
#We add the mirror directory to get older version packages
RUN echo "deb https://cloud.r-project.org/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list
#We clean and get authentication key
RUN apt-get clean && gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E084DAB9
#We add the key
RUN gpg -a --export E084DAB9 | apt-key add -
#We now update our lib
RUN apt-get -y update
# --> R PACKAGE INSTALLATION <--
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install r-base-core=3.1.0-1trusty0
RUN DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes install r-doc-html=3.1.0-1trusty0
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install r-base-dev=3.1.0-1trusty0
#Check version
RUN R --version
I used : docker build -t r-basev3-1-0-1 . to build it and that works fine. It's just the link between rstudio and my container that I can't figure it out how to do it.
Thank's in advance,
Regards
I don't think it's possible (or easy) to link RStudio in one container to R in another container, as containers are supposed to be isolated from each other. The easiest thing to do is probably to build your own r-base image by modifying this file https://github.com/rocker-org/rocker/blob/master/r-base/Dockerfile (just need to change the version part I think) and then build your own rstudio image based on this customized image by modifying files in this folder https://github.com/rocker-org/rocker/tree/master/rstudio (change the FROM part to your own customized image).
I tried to install the R-3.2.1 in my Ubuntu 14.04.2 LTS, but I had troubles with "make" command. How can I install in a better way?
Thanks
The easiest way is via launchpad:
sudo add-apt-repository -y ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install -y r-base
Avoid this dependency resolving issues...simple way to install R in Ubuntu is as below:
load the text file /etc/apt/sources.list in your editor. You must have root privileges, though because it is a system file.
First open a terminal (Applications - Accessories - terminal).
Then open /etc/apt/sources.list with root privileges: type in the terminal
gksudo gedit /etc/apt/sources.list
You will need to give your user password (this assumes you are a user with root privileges) and then the file will load in the editor "gedit".
At the end of the file, add below line :
deb http:///bin/linux/ubuntu trusty/
run below commands interminal
sudo apt-get update
sudo apt-get install r-base
• Now to start an R prompt in your terminal prompt type "R" and hit "enter" key