August 22, 2022

725 words 4 mins read

Take the RStudio IDE experimental support for arm64 architectures out for a spin

Take the RStudio IDE experimental support for arm64 architectures out for a spin

Apple’s bet on the arm architecture with their M1 and M2 processors has had an interesting side effect, developers of mainstream software are now forced to support the arm64 architecture and, since they are already supporting macOS for Apple Silicon processors anyways, supporting Linux arm64 distributions is no longer that much of a burden for them. The RStudio IDE development team is not strange to this circumstance and they have been working on general arm64 support, currently, they have made available experimental builds for the arm64 architecture (also known as aarch64) compiled for Ubuntu 20/22 LTS (the Ubuntu 20 build being compatible with Raspberry Pi OS x64) and RedHat 9. I have decided to give them a try on my Raspberry Pi SBC, if you are interested, join me in the installation process.

Basic Set Up and Dependencies

The first thing you need is a Raspberry Pi (2/3/4) with Raspberry Pi OS x64 or Ubuntu 20/22 LTS x64 installed and updated (or any other Linux arm64 system running a supported OS), make sure to update your system libraries before you start:

sudo apt update
sudo apt dist-upgrade

Then, the most important dependency for RStudio is, unsurprisingly, the R language. You have some options for installing R on arm systems, each one with its own pros and cons:

  • Install from the Operating System’s repositories
  • Compile R from source
  • Install R using rig
  • Install R from the R4Pi Project

Since there are several options now I have moved this section to a separate article that you can consult here for more details.

In all cases, I strongly recommend using the R4Pi package repository as your R packages source since it provides precompiled binaries that make installation easier and faster.

The latest experimental RStudio IDE builds (2023.08.0 builds) for arm64 now come with Quarto and Pandoc bundled so there is no longer the need to install them separately and Quarto integration features are now fully supported on arm64 systems, although, if you want a newer version of any of these software you can download the corresponding .deb file and install it using the dpkg command.

And the installation command would be something like this:

sudo dpkg -i <<file_name.deb>>

Lastly, for installing the RStudio IDE deb file, as you would do on an x86_64 system, you might want to install gdebi to handle package dependencies for you:

sudo apt install gdebi

Installing the RStudio IDE

Now we get to the point. There is no stable release of the RStudio IDE for arm64 but there are experimental daily builds available here, both for the server and desktop versions and compiled for Ubuntu 20/22 LTS and RedHat9. I’m going to try out the server version for Ubuntu 20 because it is compatible with Raspberry Pi OS x64 and I prefer to work with the IDE on my regular computer instead of directly on the Raspberry Pi, but you can install the desktop version the same way if you prefer, just change the link accordingly.

sudo gdebi rstudio-server-2023.08.0-daily-60-arm64.deb

Once the installation process is completed, you get a working RStudio IDE installation running on your Raspberry Pi, if you have chosen to install the server version as I did, you can open an RStudio session by opening a browser on any device in your network and typing the proper address i.e. http:\\your_pi_ip_addres:8787

Final Comments

Have in mind that these are experimental builds of the development version of the RStudio IDE and they are likely to be unstable and buggy so do not trust this for any sort of critical job. You can follow along with the progress on this GitHub issue.

Performance on the Raspberry Pi is acceptable, within reason for under-powered systems like these SBCs, but it is pretty far from the performance you would get on more powerful systems like Apple Silicon or full-size arm64 computers if you have access to one of those (tested on an Ampere VM and works great). If you want to get the most performance out of your Pi, use Raspberry Pi OS Lite since it’s the lightest option.

I hope you found this article useful, I will be updating the content as things develop.

Edit this page
comments powered by Disqus