I have tried installing R (for the first time on Ubuntu) using this blog post.
First three steps ran fine:
sudo echo "deb http://cran.rstudio.com/bin/linux/ubuntuxenial/" | sudo tee -a /etc/apt/sources.list
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
I got an 'OK'
Problem occurs in 4th step:
$ sudo apt-get update
E: Malformed entry 54 in list file /etc/apt/sources.list (Suite)
E: The list of sources could not be read.
I looked up the file, which said, at line 54:
deb http://cran.rstudio.com/bin/linux/ubuntuxenial/ xenial
The file was unable to be modified.
At first, I thought it was because I couldn't have access to public key so I tried the steps suggested by the first answer: How do I import a public key? However
I also tested to see if it was a firewall issue by switching from my company connection to my phone hotspot and repeating the installation process, same errors occurred, so I don't think its due to having blocked port 11371.
Any ideas how I can fix the issue? I'm not sure how to correct line 54 (in terms of what to write and also how to get past the text edit restrictions).
deb http://cran.rstudio.com/bin/linux/ubuntu/ xenial [type]
where [type] is contrib, main, partner, etc. – Organic Marble Feb 08 '17 at 18:43