Theo Pepler

Home | Research | Teaching | Software | Links | HOWTO's

HOWTO: ADD A R MIRROR TO YOUR REPOSITORY LIST IN UBUNTU LINUX

  1. Search for a CRAN mirror close to you, at http://cran.r-project.org/mirrors.html, and note the mirror address (should look something like, http://star-www.st-andrews.ac.uk/cran/, for the mirror at St Andrews).
  2. In a terminal, type

    sudo gedit /etc/apt/sources.list

  3. In the sources.list file, add the line

    deb http://star-www.st-andrews.ac.uk/cran/bin/linux/ubuntu trusty/

  4. Save the file and exit gedit.
  5. In the terminal, type

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

    (in general: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEYID, where you replace KEYID with the key you need)

    Note: If you are using a different CRAN mirror and/or different version of Ubuntu, the line in Step 3 should be changed accordingly.