[R-sig-Debian] how to install R 4.4

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Wed May 14 01:14:44 CEST 2025


On 13 May 2025 at 18:32, Stephen Bond via R-SIG-Debian wrote:
| is there a way to get R 4.4 on linux mint with ubuntu 24.04?
| 
| I allowed upgrade of packages and that overwrote my 4.4 with 4.5 and
| now i have a huge list of packages, some of which are difficult to
| install to deal with.

Well I have been meaning to write a piece about upgrading but ... what exactly is
your issue here, and how can we help?

For context, I _never_ reinstall R packages when R upgrades (apart, of
course, for changes like R 4.0.0 when we had to).  So in my standard place,
ie /usr/local/lib/R/site-library, a month after R 4.5.0 came, it is still a
healthy mix of packages installed with R 4.5.0, 4.4.*, 4.3.* and possibly
older. They all work.

Now, back to your question: I am not aware of a repo for Ubuntu that mimicks
snapshot.debian.org giving you all builds. But if you look at
packages.ubuntu.com and search you get this
  https://packages.ubuntu.com/search?keywords=r-base&searchon=names&suite=all&section=all 
indicating 4.4.1 in 24.10 and 4.4.3 in 25.04. Your 24.04 only has 4.3.3. But
read on...

But if you really think you must use R 4.4.* on Ubuntu 24.04 you can always
compile it locally, as package (ie build a .deb if you know how) or into
/usr/local. But read on...

All that said, I think it is a non-issue. R 4.5.0 works great on 24.04 and
later _and that is why we offer the backport via CRAN_.

| following the instructions on
| https://cloud.r-project.org/bin/linux/ubuntu/fullREADME.html
| 
| > To obtain the latest R 4.4 packages, add an entry like
| > 
| > deb https://cloud.r-project.org/bin/linux/ubuntu noble-cran40/
| 
| but that gave me 4.5 again. so, 1) how do I get the 4.4 and 2) how do I
| stop the automatic upgrades

To prevent apt and dpkg from upgrading a package, you can place a 'hold'. See
the dpkg documentation (man dpkg) and look for hold. You pass the package
name and the state ("hold") 'piped' to dpkg --set-selection, if I remember
correctly. There are likely some tutorials somewhere.

Now, given a particular set of apt repos (that is your local admin choice
after all) you can always call 'apt-cache policy r-base-core' to see what is
know. You will likely see r-base-core 4.4.3 still listed.  You *can* in fact
instal that from that CRAN mirror repo by giving an explicit version argument
so
  sudo apt install r-base-core=4.4.3-1.2404.0
should work but you likely need to add additional packages there to satisfy
apt ie
  sudo apt install r-base-core=4.4.3-1.2404.0 r-base-dev=4.4.3-1.2404.0
and so on.

After this you must use the 'dpkg hold' trick to not update 4.5.0 over 4.4.3
again.

Dirk


| thanks everybody
| stephen
| 
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian using r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-SIG-Debian mailing list