§2024-12-08

  1. Installing rig on Ubuntu and Debian (DEB package)
`which sudo` curl -L https://rig.r-pkg.org/deb/rig.gpg -o /etc/apt/trusted.gpg.d/rig.gpg

# Then add the rig repository:

`which sudo` sh -c 'echo "deb http://rig.r-pkg.org/deb rig main" > /etc/apt/sources.list.d/rig.list'
# If you already added both the key and the repository, then install the r-rig package (rig is a different package in Debian and Ubuntu):

`which sudo` apt update
`which sudo` apt install r-rig
 
$ rig --version
RIG -- The R Installation Manager 0.7.0
  1. rig install 4.4.2
alexlai@jetsonOrinNano:~$ rig install 4.4.2
[INFO] Running `sudo` for adding new R versions. This might need your password.
[INFO] Downloading https://github.com/r-hub/R/releases/download/v4.4.2/r-rstudio-ubuntu-2204-4.4.2_1_arm64.deb -> /tmp/rig/r-rstudio-ubuntu-2204-4.4.2_1_arm64.deb
[INFO] Running "apt-get update"
[INFO] > Hit:1 https://repo.download.nvidia.com/jetson/common r36.4 InRelease
[INFO] > Hit:2 https://repo.download.nvidia.com/jetson/t234 r36.4 InRelease
[INFO] > Hit:3 https://repo.download.nvidia.com/jetson/ffmpeg r36.4 InRelease
[INFO] > Get:4 http://rig.r-pkg.org/deb rig InRelease
[INFO] > Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
[INFO] > Hit:6 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
[INFO] > Hit:7 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
[INFO] > Hit:8 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
[INFO] > Fetched 2616 B in 2s (1107 B/s)
[INFO] > Reading package lists...
[INFO] Running "apt install --reinstall -y -o=Dpkg::Use-Pty=0 -o=Apt::Cmd::Disable-Script-Warning=1 /tmp/rig/r-rstudio-ubuntu-2204-4.4.2_1_arm64.deb"
[INFO] > Reading package lists...
[INFO] > Building dependency tree...
[INFO] > Reading state information...
[INFO] > The following additional packages will be installed:
[INFO] >   gfortran gfortran-11 libgfortran-11-dev
[INFO] > Suggested packages:
[INFO] >   gfortran-doc gfortran-11-doc libcoarrays-dev
[INFO] > The following NEW packages will be installed:
[INFO] >   gfortran gfortran-11 libgfortran-11-dev r-4.4.2
[INFO] > 0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
[INFO] > Need to get 11.4 MB/75.8 MB of archives.
[INFO] > After this operation, 130 MB of additional disk space will be used.
[INFO] > Get:1 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libgfortran-11-dev arm64 11.4.0-1ubuntu1~22.04 [466 kB]
[INFO] > Get:2 /tmp/rig/r-rstudio-ubuntu-2204-4.4.2_1_arm64.deb r-4.4.2 arm64 1 [64.4 MB]
[INFO] > Get:3 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 gfortran-11 arm64 11.4.0-1ubuntu1~22.04 [11.0 MB]
[INFO] > Get:4 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 gfortran arm64 4:11.2.0-1ubuntu1 [1168 B]
[INFO] > debconf: delaying package configuration, since apt-utils is not installed
[INFO] > Fetched 11.4 MB in 5s (2392 kB/s)
[INFO] > Selecting previously unselected package libgfortran-11-dev:arm64.
[INFO] > (Reading database ... 202980 files and directories currently installed.)
[INFO] > Preparing to unpack .../libgfortran-11-dev_11.4.0-1ubuntu1~22.04_arm64.deb ...
[INFO] > Unpacking libgfortran-11-dev:arm64 (11.4.0-1ubuntu1~22.04) ...
[INFO] > Selecting previously unselected package gfortran-11.
[INFO] > Preparing to unpack .../gfortran-11_11.4.0-1ubuntu1~22.04_arm64.deb ...
[INFO] > Unpacking gfortran-11 (11.4.0-1ubuntu1~22.04) ...
[INFO] > Selecting previously unselected package gfortran.
[INFO] > Preparing to unpack .../gfortran_4%3a11.2.0-1ubuntu1_arm64.deb ...
[INFO] > Unpacking gfortran (4:11.2.0-1ubuntu1) ...
[INFO] > Selecting previously unselected package r-4.4.2.
[INFO] > Preparing to unpack .../r-rstudio-ubuntu-2204-4.4.2_1_arm64.deb ...
[INFO] > Unpacking r-4.4.2 (1) ...
[INFO] > Setting up libgfortran-11-dev:arm64 (11.4.0-1ubuntu1~22.04) ...
[INFO] > Setting up gfortran-11 (11.4.0-1ubuntu1~22.04) ...
[INFO] > Setting up gfortran (4:11.2.0-1ubuntu1) ...
[INFO] > update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode
[INFO] > update-alternatives: warning: skip creation of /usr/share/man/man1/f95.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f95) doesn't exist
[INFO] > update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode
[INFO] > update-alternatives: warning: skip creation of /usr/share/man/man1/f77.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f77) doesn't exist
[INFO] > Setting up r-4.4.2 (1) ...
[INFO] > Processing triggers for man-db (2.10.2-1) ...
[INFO] Adding /usr/local/bin/R-4.4.2 -> /opt/R/4.4.2/bin/R
[INFO] Setting default CRAN mirror
[INFO] P3M (or rig) does not support this distro: ubuntu 22.04 or arctitecture: aarch64
[INFO] Installing pak for R 4.4.2 (if not installed yet)
[INFO] > Installing package into ‘/home/alexlai/R/aarch64-unknown-linux-gnu-library/4.4’
[INFO] > (as ‘lib’ is unspecified)
[INFO] > trying URL 'https://r-lib.github.io/p/pak/stable/source/linux-gnu/aarch64/src/contrib/../../../../../linux/aarch64/pak_0.8.0_R-4-4_aarch64-linux.tar.gz'
[INFO] > Content type 'application/gzip' length 8847947 bytes (8.4 MB)
[INFO] > ==================================================
[INFO] > downloaded 8.4 MB
[INFO] > 
[INFO] > * installing *binary* package ‘pak’ ...
[INFO] > * DONE (pak)
[INFO] > 
[INFO] > The downloaded source packages are in
[INFO] >        ‘/tmp/RtmpTtPngF/downloaded_packages’

alexlai@jetsonOrinNano:~$ which R
/usr/local/bin/R
alexlai@jetsonOrinNano:~$ R --version
R version 4.4.2 (2024-10-31) -- "Pile of Leaves"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.
sudo rig default 3.6.3