FAQ on how to install R under Ubuntu

Would it be useful to write a FAQ about the installation of R & RStudio under Ubuntu? I've seen a few questions (including my own) on the topic, and after struggling quite a bit, I think I know enough about the topic to write one.

Well, I think it's relatively self-evident :stuck_out_tongue_winking_eye:


  • possibly off-topic?
  • why a FAQ about Ubuntu and not, in general, about Linux installation? Because I have no first-hand experience with installing R under non-Ubuntu Linux systems. If someone else wants to integrate, be my guest
  • why not a FAQ about installation in general? Because I believe that installation under Windows & OSX is so easy that a FAQ is not needed, but again, if someone else wants to integrate with Windows & OSX use cases, be my guest

I thought installing R under Ubuntu was pretty straight forward. :thinking:

My common R problem on Ubuntu is that sometimes R packages require some dependencies that needed to be installed first.

To put it simply, I need to sudo apt install before install.packages().

I would not mind a FAQ.

1 Like

You are right, indeed: just installing R is straightforward. However, installing the right version for your version of Ubuntu, and configuring your trusted sources so that apt-get update doesn't complain about accessing unreliable sources every three minutes, is not as straightforward IMO. Also, I would cover "exotic" stuff such as dealing with proxy servers.

1 Like

Anyone else would like to chime in? I'm not sure what's the process (if there is a process) to create a new FAQ. Before writing anything, I'd like to hear the opinion of some other Sustainer or Moderator.

I think that your idea is good, but a bit vague. Maybe this page in CRAN can serve as what you are looking for in a FAQ for Ubuntu?

Plus, I'm not sure this is the right place for issues with apt. Can you be more specific into what you have in mind? Some packages have dependencies, these should be documented in the package instructions. If they are not clear, maybe ask about these issues with specific packages and what errors/messages you get when you try to install them.

Something else that comes to mind, are you talking about apt complaining about an unsecure repository (or something like that, I don't remember the actual wording)? Maybe you need to add the key for it? Check the example here.

1 Like

Hi Luis,

yes and no. The page you link to, is indeed the page the average R user (me) hits when s/he decides to install R on Ubuntu. However, that page is, in my opinion, a bit confusing:

  1. it starts by modifying /etc/apt/sources.list and then running sudo apt update. As you correctly noted, at this point apt will start screaming about unsecure repositories and it will refuse to update. If you know your stuff, you'll keep your cool and just go to the Secure APT section, but if you're an Ubuntu freshman like me, you could get worried. The page should start with the key installation first, or at least mention the possibility that apt may refuse to update because of a missing key.
  2. rather than mucking aroung with the contents of /etc/apt/sources.list manually, it's a bit better to use the right sudo command to update the apt repository list.
  3. My FAQ would also describe how to add OpenBLAS support (which can make a big difference, if you use a lot of linear algebra), how to deal with evil proxies, etc.

Anyway, you're indeed right that that page and a bit of trial & error are indeed enough to install R on Ubuntu. My FAQ would only have the goal to save the average user that bit of trial & error.

Weโ€™ve never really created an faq like that here. I think normally, something like this be a support.rstudio.com article or a post in a personal blog.

I guess the advantage of an faq article on RStudio community would be that we could turn it into a Wiki page (most would be able to edit it). Also, as people discover the guide in future andnhave questions, theyโ€™d post those questions as replies below.

I guess it would be important to have a title that clearly limits the scope of the faq/guide.

1 Like

All of your proposals are ok for me:

  • I can definitely post it on Medium, since I started blogging this week and I'm eager for blog topics :slightly_smiling_face: but I considered posting it here, because this community gives me so much, and I would really like to give back when I can.
  • http://support.rstudio.com/ is also fine for me, but I'm not sure if I can create articles there, rather than posting questions, and anyway I'd really avoid creating the umpteenth account on another website. If you think this is the best solution, I'll write the draft and send it by email to whomever wants to publish it there as an article.
  • I'm also fine with a Wiki page. I don't know how to write one, I guess I write a draft post and then a Moderator upgrades it?

I may start writing a FAQ draft and then we can decide to move it somewhere else if you change your mind. Or I can also wait and we can talk again about this after the Christmas rush. I'm not in a hurry :slightly_smiling_face:

Only rstudio support folks are able to post to support.rstudio.com. But I brought it up since guides like the one you are describing are posted and updated frequently there. (Quite often, as rstudio support folks deals with a customer's problem, they likes to convert lessons learned in that experience into a more generalizable support guide.)

I created a new category under #meta, https://community.rstudio.com/c/meta/faq for guides and #faqs.

Once you have a draft, let's post it there as a wiki, and see how it works out?

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.