Search code examples
rdependencies

Ubuntu 24.04, R - libcurl4t64


I just installed Ubuntu 24.04 and I was trying to install R.

$ export R_VERSION=4.4.0
$ curl -O https://cdn.rstudio.com/r/ubuntu-2404/pkgs/r-${R_VERSION}_1_amd64.deb
$ gdebi r-${R_VERSION}_1_amd64.deb

But I have this error:

root@vm:~# gdebi r-${R_VERSION}_1_amd64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: libcurl4t64

Running

apt list --installed | grep libcurl4

I have

libcurl4-openssl-dev/jammy-updates,jammy-security,now 7.81.0-1ubuntu1.16 amd64 [installed]
libcurl4/jammy-updates,jammy-security,now 7.81.0-1ubuntu1.16 amd64 [installed]

Solution

  • I'm assuming that you are working as the root user.

    1. Update package list.
    apt-get update
    
    1. Install wget (I prefer it to curl, but either will do the same thing!).
    apt-get install -y wget
    
    1. Download archive.
    wget https://cdn.rstudio.com/r/ubuntu-2404/pkgs/r-4.4.0_1_amd64.deb
    
    1. Install archive. This will result in unresolved dependencies, but we'll fix that in the next step.
    dpkg -i r-4.4.0_1_amd64.deb
    
    1. Resolve dependencies
    apt-get install -y -f
    
    1. Run R. The folder into which R is installed is not on your PATH, so you can either add it to the path or create a symlink from a location that is on your path.
    /opt/R/4.4.0/bin/R