Skip to content

Installing swirl on Linux

Nick Carchedi edited this page Apr 30, 2014 · 36 revisions

swirl and its dependencies require R version 3.0.2 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.


Ubuntu and its derivatives

These instructions have been successfully tested on:

  • Ubuntu 12.04 LTS (Precise Pangolin)
  • Linux Mint 16 (Petra)

1. Install the most recent version of R. If you have R installed already, go to #2.

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

2. Confirm that you have R version 3.0.2 or later. If not, return to #1.

$ R --version

3. Get RStudio (optional, but recommended).

Download from http://www.rstudio.com/ide/download/desktop.

4. Install libcurl.

This is required for the RCurl package, which swirl uses to download courses from the internet.

$ sudo apt-get install libcurl4-openssl-dev

5. From R or RStudio, install and run swirl.

> install.packages("swirl")
> swirl()

NOTE: If you upgrading from an earlier version of R, you may need to do install.packages("codetools") before installing swirl.


Other Resources

Clone this wiki locally