Installing R Language on Ubuntu 16 - unmet dependencies - r

Installing the R language following the instructions at the site [ here ] .
During installation I receive an error "unmet dependencies" at the r-base component using the apt-get install command. See the log with the command sequence below:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
Executing: /tmp/tmp.QQyv0HB7mS/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
/data/shared/datascience# add-apt-repository 'deb [arch=s390x] https://cran.rstudio.com/bin/linux/ubuntu xenial/'
apt-get update
Hit:1 https://cran.rstudio.com/bin/linux/ubuntu xenial/ InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
Get:3 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease [102 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease [102 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main s390x Packages [554 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports xenial-updates/universe s390x Packages [494 kB]
Fetched 1252 kB in 12s (104 kB/s)
Reading package lists... Done
apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 3.4.0-1xenial0) but it is not going to be installed
Depends: r-recommended (= 3.4.0-1xenial0) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
Recommends: r-doc-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Is this an error in my install procedure, or is this packet broken?

By using the Universal Ubuntu repository and command shown below, the issue was solved:
sudo apt-get install r-base r-base-dev

Related

Log in firebase in codeanywhere or upload webapp files in firebase without cli

I have a webapp firebase project in codeanywhere but I can't login in firebase, I have installed firebase-tools#9.23.3 and when I run "firebase login --no-localhost" I have a link to log in, but when I click on link another page is opened with:
"Errore 400: invalid_request The version of the app you're using
doesn't include the latest security features to keep you protected.
Please make sure to download from a trusted source and update to the
latest, most secure version."
I wrote to support of codeanywhere and they said that don't officially support firebase. So I want to know if there is a workaround to deploy the webapp in firebase inside codeanywhere or eventually upload the webapp files in firebase without cli.
Basically I would not like to install any editor and any cli on my pc and be able to work only online on my firebase project. I can also use another environment like codeanywhere as long as it allows me to work (edit and deploy) only online to my firebase project.
Update:
cabox#nodejs-white-lion:~/workspace/GAU$ sudo apt-get remove nodejs npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'npm' is not installed, so not removed
The following packages will be REMOVED:
nodejs
0 upgraded, 0 newly installed, 1 to remove and 10 not upgraded.
After this operation, 125 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 40238 files and directories currently installed.)
Removing nodejs (14.21.1-deb-1nodesource1) ...
Processing triggers for man-db (2.7.5-1) ...
cabox#nodejs-white-lion:~/workspace/GAU$ curl -sL deb.nodesource.com/setup_16.x | sudo -E bash -
## Installing the NodeSource Node.js 16.x repo...
## Populating apt-get cache...
+ apt-get update
Get:1 http://repo.mysql.com/apt/ubuntu xenial InRelease [22.2 kB]
Err:1 http://repo.mysql.com/apt/ubuntu xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
Hit:2 https://deb.nodesource.com/node_14.x xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:6 http://archive.canonical.com/ubuntu xenial InRelease
Hit:7 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Fetched 22.2 kB in 0s (36.5 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/xenial/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Some index files failed to download. They have been ignored, or old ones used instead.
## Confirming "xenial" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_16.x/dists/xenial/Release'
## Adding the NodeSource signing key to your keyring...
+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
## Creating apt sources list file for the NodeSource Node.js 16.x repo...
+ echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x xenial main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x xenial main' >> /etc/apt/sources.list.d/nodesource.list
## Running `apt-get update` for you...
+ apt-get update
Get:1 http://repo.mysql.com/apt/ubuntu xenial InRelease [22.2 kB]
Err:1 http://repo.mysql.com/apt/ubuntu xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:6 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease
Get:7 https://deb.nodesource.com/node_16.x xenial InRelease [4,584 B]
Get:8 https://deb.nodesource.com/node_16.x xenial/main amd64 Packages [774 B]
Fetched 27.6 kB in 0s (28.2 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/xenial/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Some index files failed to download. They have been ignored, or old ones used instead.
## Run `sudo apt-get install -y nodejs` to install Node.js 16.x and npm
## You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
cabox#nodejs-white-lion:~/workspace/GAU$ udo apt-get update && sudo apt-get install yarn
bash: udo: command not found
cabox#nodejs-white-lion:~/workspace/GAU$ sudo apt-get update && sudo apt-get install yarn
Get:1 http://repo.mysql.com/apt/ubuntu xenial InRelease [22.2 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Err:1 http://repo.mysql.com/apt/ubuntu xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease
Hit:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:5 https://deb.nodesource.com/node_16.x xenial InRelease
Hit:6 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:7 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease
Fetched 22.2 kB in 0s (41.8 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/xenial/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package yarn
cabox#nodejs-white-lion:~/workspace/GAU$ node -v
v14.16.0
cabox#nodejs-white-lion:~/workspace/GAU$

How to install R on Ubuntu 21.10

I just bought a new machine and made a fresh installation of Ubuntu 21.10 since I've read that the newer kernel works better with graphics drivers. I'm planning to update to the 22.04 LTS when it will be available. I didn't realize, however, that I might run into challenges with R.
There are plenty of questions here in SO on installing R on Ubuntu, but none seemed recent enough to address the Ubuntu version 21.10.
Ubuntu Packages For R - Full Instructions state that
As of May 19, 2021 the supported releases are
Hirsute Hippo (21.04, amd64 only)
Groovy Gorilla (20.10, amd64 only),
Focal Fossa (20.04; LTS and amd64 only),
Bionic Beaver (18.04; LTS), and
Xenial Xerus (16.04; LTS).
So, if I understand correctly, I have three options:
Uninstall 21.10 and replace with 21.04
Wait for support for 21.10
Install R from source
Now, the question is, have I understood correctly, or could I use, for example, the 21.04 repository (hirsute-cran40/)?
Apparently, it is ok to use a repository of older releases.
I was encouraged by Andre Wildeberg (thanks!) and added the 21.04 repository (hirsute-cran40/) into my /etc/apt/sources.list:
deb https://cloud.r-project.org/bin/linux/ubuntu hirsute-cran40/
Then, you can follow the rest of the CRAN instructions.
Add the relevant GPG key (under "Secure APT", half way through the document):
$ 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
Finally, install R:
$ sudo apt-get update
$ sudo apt-get install r-base
And everything should be working fine.
You need a newer signing key for that repo:
root:~# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.MsSJzqgwfx/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
gpg: key 51716619E084DAB9: "Michael Rutter <marutter#gmail.com>" 1 new signature
gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory
gpg: can't connect to the agent: No such file or directory
gpg: Total number processed: 1
gpg: new signatures: 1
root:~# apt update
Get:1 https://cloud.r-project.org/bin/linux/ubuntu hirsute-cran40/ InRelease [3628 B]
Get:2 http://security.ubuntu.com/ubuntu impish-security InRelease [110 kB]
Hit:3 http://archive.ubuntu.com/ubuntu impish InRelease
Get:4 http://archive.ubuntu.com/ubuntu impish-updates InRelease [110 kB]
Get:5 http://archive.ubuntu.com/ubuntu impish-backports InRelease [101 kB]
Fetched 325 kB in 1s (422 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
root:#
One you have that, impish works fine. That said, hirsute binaries should work too (or even focal binaries, as one does with the 5000+ r-cran-* binaries the 'cran2deb4ubuntu' repo for the LTS release).

installing R in ubuntu 20.04

I am trying to re-install R in ubuntu 20.04
when I use
sudo apt-get update
I get the following error
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease
Hit:3 https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/ InRelease
Hit:4 https://cloud.r-project.org/bin/linux/ubuntu xenial-cran40/ InRelease
Hit:5 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ InRelease
Hit:6 https://cloud.r-project.org/bin/linux/ubuntu eoan-cran35/ InRelease
Hit:7 https://deb.leap.se/client release InRelease
Ign:8 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran InRelease
Ign:9 https://cloud.r-project.org/bin/linux/ubuntu focal-cran36/ InRelease
Err:10 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran Release
404 Not Found [IP: 143.204.201.112 443]
Err:11 https://cloud.r-project.org/bin/linux/ubuntu focal-cran36/ Release
404 Not Found [IP: 143.204.201.112 443]
Err:12 https://repo.windscribe.com/ubuntu bionic InRelease
Temporary failure resolving 'repo.windscribe.com'
Reading package lists... Done
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu bionic-cran Release' does not have a Release file.
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.
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu focal-cran36/ Release' does not have a Release file.
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.
can anyone please help me out ?
Today I found in keyserv.ubuntu.com a new key:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 95c0faf38db3ccad0c080a7bdc78b2ddeabc47b7.
The previous key is expired.
You didn't specify which version of Ubuntu you are running, but this guide might be useful.
In short, first install transport
´sudo apt install apt-transport-https software-properties-common´
Then add their keys to your apt-repository
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
Remove the other listings of R, and then add this instead
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
Then you can install r-base as usual with
sudo apt update
sudo apt install r-base
Check that you have installed R correctly with R --version

Update R in ubuntu

I'm having some problems to update my R in my ubuntu. When I try I get this message:
sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 4.0.0-1.1804.0) but 3.6.3-1eoan is to be installed
Depends: r-recommended (= 4.0.0-1.1804.0) but 3.6.3-1eoan is to be installed
E: Unable to correct problems, you have held broken packages.
When I ran: apt policy r-base i've got this message:
apt policy r-base
r-base:
Installed: 3.6.3-1eoan
Candidate: 4.0.0-1.1804.0
Version table:
4.0.0-1.1804.0 500
500 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ Packages
*** 3.6.3-1eoan 100
100 /var/lib/dpkg/status
3.6.1-4 500
500 http://br.archive.ubuntu.com/ubuntu eoan/universe amd64 Packages
500 http://br.archive.ubuntu.com/ubuntu eoan/universe i386 Packages
I've already changed my source list puting this inside:
https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/
Does anyone know what do I do to resolve this problem?
Browse to /etc/apt/sources.list and check if you have added the correct repo.
Remove any old CRAN mirror like bionic-cran35.
If you haven't properly added the current CRAN mirror, run these commands:
(you can confirm the GPG key here: https://cran.r-project.org/bin/linux/ubuntu/README.html):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/"
Then fix remaining problems and update (which might already solve the issue):
sudo apt --fix-broken install
sudo apt autoremove
sudo apt update
sudo apt upgrade
Remove current version of r and dependencies:
sudo apt remove r-base-core
sudo apt remove r-recommended
sudo apt remove r-base
Install the newest r-base:
sudo apt install r-base
To check your success, run this code:
R
version

Unmet dependencies installing R 3.6.2 on Ubuntu 18.14 LTS

I use 18.04.4 LTS (Bionic Beaver)
I wanted to upgrade my R version from 3.4.4 to 3.6.2, but now I have no R at all.
here are my actions:
1 step:
sudo apt update
sudo apt-get upgrade
sudo apt-get dist-upgrade
2 step:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
3 step:
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
return:
Hit:1 http://ua.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ua.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://ua.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/ InRelease
Hit:5 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:7 https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/ InRelease
Hit:8 https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/ InRelease
Hit:9 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease
Reading package lists... Done
4 step:
sudo apt update
sudo apt install r-base
return:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 3.6.2-1xenial) but it is not going to be installed
Depends: r-recommended (= 3.6.2-1xenial) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
then I try:
R --version
return:
Command 'R' not found, but can be installed with:
sudo apt install r-base-core
I try:
sudo apt install r-base-core
The following packages have unmet dependencies:
r-base-core : Depends: libreadline6 (>= 6.0) but it is not
installable
Recommends: r-recommended but it is not going to be
installed
Recommends: r-base-dev but it is not going to be
installed
E: Unable to correct problems, you have held broken packages.
You can try two things:
As you already appear to have installed, just to sudo apt-get dist-upgrade. It will list candidate upgrades, you can still back out. Advantage: it resolved interdependent upgrades for you.
Continue what you did but list the affected packages, i.e. sudo apt-get install r-base r-recommended r-base-hmtml. This will work, but may requires several iterative steps.
I took a look at the etc/apt/sources.list file and realised that I had the same repository repeated. I deleted two lines and the problem was solved.

Resources