I am unable to install the R package ggplot2 because it depends on the package digest, which requires R (>= 3.3.0) and I only have 3.2.3. I tried upgrading R as described here, but I get an unusual message after the first line and an error after the third. The results of the first 3 lines are below exactly as the appear on the command terminal, edited for privacy and empty lines before commands added for clarity.
Name1#Name2 ~ $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
[sudo] password for Name1:
Executing: /tmp/tmp.BIQ28xf0ql/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv-keys
E298A3A825C0D65DFD57CBB651716619E084DAB9
gpg: requesting key E084DAB9 from hkp server keyserver.ubuntu.com
gpg: key E084DAB9: "Michael Rutter <marutter#gmail.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
Name1#Name2 ~ $ sudo echo "deb http://cran.wustl.edu/bin/linux/ubuntu xenial/" | sudo tee -a /etc/apt/sources.list
deb http://cran.wustl.edu/bin/linux/ubuntu xenial/
Name1#Name2 ~ $ sudo apt update
E: Malformed entry 2 in list file /etc/apt/sources.list (Suite)
E: The list of sources could not be read.
All commands after the third give the same errors, with commands 4 and 6 giving the errors twice for some reason.
I will be frank and admit that this whole think is very beyond me and I am just copying and pasting the code that supplied without understanding most of it. Any help will be greatly appreciated.
EDIT: Answer available here.
You are almost there, but it seems like your sources.list may be malformed.
First delete all entries related to R by using nano /etc/apt/sources.list (or your favorite editor).
Then as you did add the key
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
Then add the correct repository
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
Quick update
sudo apt update
Install r-base by
sudo apt-get install r-base
And confirm everything is working with
R --version
Related
I am trying to install the R language in the docker file. My Ubuntu version is 18.04 LTS
RUN add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/' && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 \
apt-get update \
apt-get install -y r-base \
rm -rf /var/lib/apt/lists/*
But I am getting the below error. But it is working in my machine and not working docker file.
Reading package lists...
W: GPG error: https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease' is not signed.
The command '/bin/bash -c add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/' && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 apt-get update apt-get install -y r-base rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
Could anyone help to fix this issue?
Thanks in advance
Add the key before the adding the repo.
Also you need the && after every command to chain them all.
I prefer to use ; after set -uex for long chains so I can easily see which command output is coming from, particularly when it fails.
RUN set -uex; \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9; \
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'; \
apt-get update; \
apt-get install -y r-base; \
rm -rf /var/lib/apt/lists/*
I have tried to upgrade R from 3.4.4 to 4.0 in Ubuntu 16.04.7 LTS (Xenial Xerus). I have followed and run the following scripts.
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran40/'
$ sudo apt-get update
$ sudo apt install r-base
Output:
"Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base is already the newest version (3.4.4-1xenial0)".
The terminal always showed that "r-base is already the newest version" and refused to upgrade. I tried to upgrade R 3.6 as well and got a similar issue. Any thoughts? Thank you so much for your help.
I am trying to run carla simulator in a google colab with python jupyter notebook.
I followed the guide and I executed the following commands
!pip install pygame
!pip install numpy
!sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 304F9BC29914A77D
!sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-0.9.8/ all main"
!sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB53A429E64554FC &&
!sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-0.9.7/ all main"
!sudo apt-get update
!sudo apt-get install carla
however when I tried to run it I got an error
Package carla is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is
only available from another source
E: Package 'carla' has no installation candidate
how can I install the carla simulator on google colab?
You can try to use this repo: https://github.com/MichaelBosello/carla-colab
There is google colab notebook with pre-installed Carla.
I am trying to update to R version 3.5.3, by using the R manual. However, when I type this line:
deb https://cloud.r-project.org/bin/linux/ubuntu cosmic-cran35/
I get a return of command not found.
I tried to add it to my source list as previously suggested, but this does not seem to work. I am trying to do this on a linux system
Edit: Thanks #Ralf for correction (see comments)
Append the 'deb' line to your sources.list by opening a terminal and typing:
echo "deb https://cloud.r-project.org/bin/linux/ubuntu cosmic-cran35/" | sudo tee -a /etc/apt/sources.list
Install the R-CRAN GPG key to verify what you're installing:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
Update your package list and install with:
sudo apt update
sudo apt install r-base r-base-dev
Travis CI failed when building an R package with the following error that I've never seen before - and one that seems to be related to the gpg key not being retrieved (instead of the typical errors in my code :)).
Installing R
0.46s$ sudo add-apt-repository "deb http://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)/"
60.08s$ sudo apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
Executing: /tmp/tmp.Cp93xmp8GR/gpg.1.sh --keyserver
ha.pool.sks-keyservers.net
--recv-keys
E298A3A825C0D65DFD57CBB651716619E084DAB9
gpg: requesting key E084DAB9 from hkp server ha.pool.sks-keyservers.net
gpgkeys: key E298A3A825C0D65DFD57CBB651716619E084DAB9 can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
The command "sudo apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9" failed and exited with 2 during .
Your build has been stopped.
More is on Travis here