Reputation: 6740
I am trying to install R 4.0.3 on a Raspberry Pi 4 running Ubuntu 20.10 64-bit. It is fully updated.
Before I did anything, I added the correct CRAN repository for this OS using sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu groovy-cran40/'
.
When I run sudo apt install r-base
, I get an error that r-base-core and r-recommendrf, both of which are specified to require version >= 4.0.3-1.2010.0
, are "not going to be installed".
Checking them individually, it seems that r-base-core is the problem. If I try to install r-recommended by itself, I get an error that it needs "r-base-core (>= 4.0.3-1.2010.0) but 4.0.2-1build1 is to be installed".
If I check https://cloud.r-project.org/bin/linux/ubuntu/groovy-cran40/, I notice that r-base-core 4.0.3 is only available in an AMD64 variant, per the amd64 in the filenames. I observe that the r-base package's files do not have amd64 in their filenames. To me, that suggests that, currently, you're only running R 4.0.3 on Ubuntu 20.10 if you are on an Intel/AMD 64-bit platform. https://cloud.r-project.org/bin/linux/ubuntu/groovy-cran40/Packages seems to back that up.
Are there practical alternatives, other than to wait for an r-base-core 4.0.3 package to appear that is compatible with more platforms?
Upvotes: 2
Views: 1379
Reputation: 6740
Found the answer. Most of the credit goes to Andrés Castro Socolich, who provided most of the solution.
This assumes a mostly vanilla Raspberry Pi 4 with Ubuntu 20.10 64-bit installed:
sudo apt update
sudo apt ugrade
sudo apt-get install -y g++ gfortran libreadline6-dev libx11-dev libxt-dev libpng-dev libjpeg-dev libcairo2-dev xvfb libbz2-dev libzstd-dev liblzma-dev libcurl4-openssl-dev texinfo texlive texlive-fonts-extra screen wget libpcre2-dev zlib1g-dev libbz2-dev liblzma-dev libpcre2-dev libcurl4-openssl-dev openjdk-11-jdk make
cd /usr/local/src
sudo wget https://cran.rstudio.com/src/base/R-4/R-4.0.3.tar.gz
sudo su
tar zxvf R-4.0.3.tar.gz
cd R-4.0.3
./configure --enable-R-shlib
make
make install
cd ..
rm -rf R-4.0.3*
exit
cd
Upvotes: 6