[R-sig-Debian] Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image

Gerber, Lauren J |@uren@gerber @end|ng |rom he|@|nk|@||
Mon Jul 8 15:07:32 CEST 2024


Hi All,

I am building a Docker image that uses Ubuntu 22.04 and am having issues installing the latest version of R (R 4.4.1). The current R version is 4.1.2:
:/# apt-cache policy r-base-core
r-base-core:
  Installed: 4.1.2-1ubuntu2
  Candidate: 4.1.2-1ubuntu2
  Version table:
 *** 4.1.2-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status

I also checked the Ubuntu version (I am not sure if the ‘No LSB modules are available’ is an issue):
:/# lsb_release -a
No LSB modules are available.
Distributor ID:            Ubuntu
Description:                 Ubuntu 22.04.4 LTS
Release:  22.04
Codename:                  jammy

I have tried referring to these instructions listed here: https://cloud.r-project.org/bin/linux/ubuntu/. Please see below:

When I’m in interactive mode in my Docker container and I try the first line of suggested code, it results in the following:
:/# apt update -qq
W: GPG error: https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease: At least one invalid signature was encountered.
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease' is not signed.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com/ubuntu jammy-security InRelease: At least one invalid signature was encountered.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu jammy InRelease: At least one invalid signature was encountered.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu jammy-updates InRelease: At least one invalid signature was encountered.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.adoptium.net/artifactory/deb jammy InRelease: At least one invalid signature was encountered.

I skipped that line and tried the next line:
:/# apt install --no-install-recommends software-properties-common dirmngr
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dirmngr is already the newest version (2.2.27-3ubuntu2.1).
software-properties-common is already the newest version (0.99.22.9).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

Next, I did this:
:/# wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
                • This returned the public key.

Then, I checked this:
:/# gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
                • This showed that Michael Rutter’s key had been added (expiring 2027-09-30)

Then I ran this:
:/# add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/<https://cloud.r-project.org/bin/linux/ubuntu%20jammy-cran40/>"
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
WARNING:root:system-image-cli failed, using defaults: [Errno 20] Not a directory: 'system-image-cli'
Repository: 'deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/'
Description:
Archive for codename: jammy-cran40/ components:
More info: https://cloud.r-project.org/bin/linux/ubuntu
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.

This seemed to be an issue when pressing enter:
Found existing deb entry in /etc/apt/sources.list.d/archive_uri-https_cloud_r-project_org_bin_linux_ubuntu-jammy.list
Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_cloud_r-project_org_bin_linux_ubuntu-jammy.list
Found existing deb-src entry in /etc/apt/sources.list.d/archive_uri-https_cloud_r-project_org_bin_linux_ubuntu-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_cloud_r-project_org_bin_linux_ubuntu-jammy.list
Get:1 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease [3626 B]
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:3 https://packages.adoptium.net/artifactory/deb jammy InRelease [7504 B]
Hit:4 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Err:1 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease
  At least one invalid signature was encountered.
Err:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
  At least one invalid signature was encountered.
Err:3 https://packages.adoptium.net/artifactory/deb jammy InRelease
  At least one invalid signature was encountered.
Err:4 http://archive.ubuntu.com/ubuntu jammy InRelease
  At least one invalid signature was encountered.
Err:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
  At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease: At least one invalid signature was encountered.
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com/ubuntu jammy-security InRelease: At least one invalid signature was encountered.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.adoptium.net/artifactory/deb jammy InRelease: At least one invalid signature was encountered.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu jammy InRelease: At least one invalid signature was encountered.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu jammy-updates InRelease: At least one invalid signature was encountered.

Then, I tried this:
:/# apt install --no-install-recommends r-base
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  elpa-ess r-doc-info | r-doc-pdf
Recommended packages:
  r-base-html
The following NEW packages will be installed:
  r-base
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 9288 B of archives.
After this operation, 63.5 kB of additional disk space will be used.
E: You don't have enough free space in /var/cache/apt/archives/.

It seems there is an issue with Ubuntu 22.04 and the signature verification, as well as a space issue in /var/cache/apt/archives/.

I am not sure how to resolve these issues when building my Docker image.

Would you please advise?

Thank you.

Br,
Lauren

	[[alternative HTML version deleted]]



More information about the R-SIG-Debian mailing list