-
Notifications
You must be signed in to change notification settings - Fork 598
Installing swirl on Linux
swirl and its dependencies require R version 3.1.0 or later as well as a recent version of libcurl. This page is our attempt to collect any information that might be helpful to Linux users wanting to install swirl.
These instructions have been successfully tested on:
- Ubuntu 12.04 LTS (Precise Pangolin)
- Linux Mint 16 (Petra)
Official source: http://cran.r-project.org/bin/linux/ubuntu/README
IMPORTANT: In the first line below, precise/
should be replaced with the version of Ubuntu you are using. Other examples: trusty/
, saucy/
, quantal/
, lucid/
. If you're not sure which version you have, type cat /etc/*release
at the command line.
$ sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu precise/" >> /etc/apt/sources.list'
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
$ sudo apt-get update
$ sudo apt-get install r-base-dev
NOTE
Most modern Linux distros recommend you not edit /etc/apt/sources.list
directly and rather place any additions you want to outlive a package update in the /etc/apt/sources.list.d
directory. With that in mind a best-practices alternative to the command above would be:
$ sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu precise/" >> /etc/apt/sources.list.d/cran.list'
Note also that using either of these instructions on a more modern distribution (e.g. Ubuntu 14.10, and probably 14.04) breaks the install, since the package at that source depends on libtiff4, but this has been removed (superseded by libtiff5). Happily, users can (and should) skip that step entirely, since a compatible package (R 3.1.1) is already included in that distribution.
PS. Thanks Charl and joegodbehere
$ R --version
Download from http://www.rstudio.com/ide/download/desktop.
This is required for the RCurl package, which swirl uses to download courses from the internet.
$ sudo apt-get install libcurl4-openssl-dev
If you're installing on Linux Mint 17:
$ sudo apt-get install libcurl4-openssl-dev r-base-dev libxml2-dev
> install.packages("swirl")
> library(swirl)
> swirl()
NOTE: If you upgrading from an earlier version of R, you may need to do install.packages("codetools")
before installing swirl.
-
Often, the most challenging part of getting swirl to work on Linux is getting a recent version of R. We've found this blog post to be a helpful resource for installing up-to-date versions of R on a variety of Linux platforms.
-
Official R FAQ: Are there Unix-like binaries for R?
-
Official R installation docs for various Linux distributions:
-
Official R Installation and Administration manual on building R from source: Installing R under Unix-alikes.
-
Download page for curl and libcurl: http://curl.haxx.se/download.html
Fix for graphics not working on Ubuntu: https://gist.github.com/papas8105/2cbd941dceb1678918ea
Also see this issue: https://github.com/swirldev/swirl/issues/498#issuecomment-292078652