R plugin for asdf version manager.
- Mac
- Homebrew: used to install the remainder of the dependencies
brew install --cask xquartz
brew install gcc xz bzip2 pcre2
- See the note below
- Linux
- Ubuntu / Debian
sudo apt-get install build-essential libcurl3-dev libreadline-dev gfortran libbz2-dev liblzma-dev libpcre3 libpcre3-dev
- Ubuntu / Debian
After installing the other dependencies, you may need to modify your environment a bit in order to pick up the dependencies from homebrew.
# Set bzip2 binary and compile paths
export PATH="/usr/local/opt/bzip2/bin:$PATH"
export CPPFLAGS="-I/usr/local/opt/bzip2/include $CPPFLAGS"
export LDFLAGS="-L/usr/local/opt/bzip2/lib $LDFLAGS"
# Set pcre2 binary and compile paths
export PATH="/usr/local/opt/pcre2/bin:$PATH"
export CPPFLAGS="-I/usr/local/opt/pcre2/include $CPPFLAGS"
export LDFLAGS="-L/usr/local/opt/pcre2/lib $LDFLAGS"
asdf plugin-add R https://github.com/iroddis/asdf-R.git
Check asdf readme for instructions on how to install & manage versions of R.
When installing R using asdf install
, you can pass custom configure options with the following env vars:
R_CONFIGURE_OPTIONS
- use only your configure optionsR_EXTRA_CONFIGURE_OPTIONS
- append these configure options along with ones that this plugin already uses
RStudio requires building R shared library, in order to do that pass an extra configure option to asdf install
:
R_EXTRA_CONFIGURE_OPTIONS=--enable-R-shlib asdf install R <version>
Thanks to asdf-postgres for providing an awesome plugin that was easy to modify for this language.