I've got an error while trying to add the R cran mirror for Switzerland to the sources.list file (http://stat.ethz.ch/CRAN/), even though I followed the instructions from page http://stat.ethz.ch/CRAN/ (I'm running Ubuntu 13.04) I really can't find what I'm doing wrong... here are my steps:

sudo gedit /etc/apt/sources.list

then, in the source.list file, I added a line like that, at the very end:

#R repositories switzerland 
http://stat.ethz.ch/CRAN/bin/linux/ubuntu raring/  

then, save and exit and the error appears when typing the sudo apt-get update command:

sudo apt-get update 
E: Type 'http://stat.ethz.ch/CRAN/bin/linux/ubuntu' is not known on line 60 in
source list /etc/apt/sources.list
E: The list of sources could not be read.    


Thank you for your answers!

  • I think you can't mix R repos and Ubuntu repos. When doing a command such as install.packages() from within R, it should prompt you to pick a repo. There you can choose CH. Jul 22, 2013 at 20:02
  • that's ok, I just followed the instruction on the R webpage
    – dovah
    Jul 23, 2013 at 8:17

1 Answer 1


héhé found the answer: just adding 'deb' before the link:

deb http://stat.ethz.ch/CRAN/bin/linux/ubuntu raring/    

However, people can simply install directly by running from terminal

sudo apt-get install r-base     

it's much easier and worked for me (R installed and works well)

Not the answer you're looking for? Browse other questions tagged or ask your own question.