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
Related
I have been trying for days now. I would like to upgrade to the latest version of R. I have followed advice found on this link :
Problem installing R4.0 on LInux Mint 19.3
but for me the problem persists for me.
When I do
echo -e "\ndeb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/" | sudo tee -a /etc/apt/sources.list
then
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get install r-base
I get this
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-recommended (= 4.0.5-1.1804.0) but it is not going to be installed
W: Target Packages (Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7
W: Target Translations (en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7
W: Target Translations (en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7
E: Unable to correct problems, you have held broken packages.
If anyone has an idea of how to solve this I would be eternally grateful.
W: Target Translations (en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:7
Remove the duplicate entry in your sources (line 5 and 7):
sudo sed -i '7d' /etc/apt/sources.list
The following packages have unmet dependencies:
r-base : Depends: r-recommended (= 4.0.5-1.1804.0) but it is not going to be installed
Use the following command:
sudo apt update
sudo apt install --no-install-recommends r-base
This post:
https://unix.stackexchange.com/a/612316/367012
Says Mint is different than Ubuntu in adding repositories, and suggests manually editing the repository list,
$ sudo xed /etc/apt/sources.list.d/additional-repositories.list
to add:
deb cloud.r-project.org/bin/linux/ubuntu bionic-cran40/
Save and exit the editor, then update the package list:
$ sudo apt update
This post: https://askubuntu.com/a/1113944/968912 suggests removing all the previous versions of R first.
I'm trying to install R 4.0 on Ubuntu, but get this error:
$ 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.2004.0) but it is not going to be installed
Depends: r-recommended (= 4.0.0-1.2004.0) 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.
I have run these commands to set up apt to receive R 4.0, as recommended at 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 focal-cran40/'
sudo apt-get update
What am I doing wrong, and how can I fix it?
I did have R 3.4 installed on this system before, and removed it with
sudo apt-get remove r-*
sudo apt-get purge r-*
Have I screwed something up by doing that?
The error was, it turned out, entirely mine:
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
added the repo for Ubuntu 20.04. I needed:
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'
(using ubuntu 14.04.3)
i need to install libx32gcc-4.8-dev libc6-dev-i386.
when i try to download it by writing:
sudo apt-get install libx32gcc-4.8-dev libc6-dev-i386
the terminal returns:
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:
libx32gcc-4.8-dev : Depends: lib32gcc1 (>= 1:4.8.4-2ubuntu1~14.04.3) but it is not going to be installed
Depends: libx32gcc1 (>= 1:4.8.4-2ubuntu1~14.04.3) but it is not going to be installed
Depends: lib32asan0 (>= 4.8.4-2ubuntu1~14.04.3) but it is not going to be installed
Depends: libx32asan0 (>= 4.8.4-2ubuntu1~14.04.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.`
and it doesn't work.
i have tried
sudo apt-get upgrade
sudo apt-get install libx32gcc-4.8-dev libc6-dev-i386
same result
and
sudo apt-get remove libx32gcc-4.8-dev libc6-dev-i386
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get update
sudo apt-get install libx32gcc-4.8-dev libc6-dev-i386
but it doesn't work either...
i think you have to fix the packages by doing this
sudo apt-get install -f
I am trying to install R on Ubuntu 14.10
When I am giving the command to download r-base, I get the following error
roy#laptop:~$ 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 (>= 3.1.2-1precise0) but it is not going to be installed
Depends: r-recommended (= 3.1.2-1precise0) 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.
What can I do? I found adding backports of raring could help. I tried several servers, but I'm getting a 404.
Here are the following changes I brought in /etc/apt/sources.list
## R
deb http://cran.cnr.Berkeley.edu/bin/linux/ubuntu precise/
## Raring backports
deb http://us.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
Step 1:
You can use any of the below in your /etc/apt/sources.list file to get the latest copy of R, replace <my.favorite.cran.mirror> by the actual URL of your favorite CRAN mirror. See http://cran.r-project.org/mirrors.html for the list of CRAN mirrors.
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu utopic/
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu trusty/
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu precise/
or
deb http://<my.favorite.cran.mirror>/bin/linux/ubuntu lucid/
Step 2:
To install the complete R system, use below on command line:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rdev
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base
For a detailed instruction, please follow the steps given in the link here!
I used aptitude install to install a package, Ubuntu 11.10 oneiric, that apparently I couldn't install because of dependencies. I removed a couple of more libraries while doing it. I uninstalled Rstudio but still can't install R on my machine. I'm on ubuntu and this is what I get while running
sudo apt-get install r-base
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 2.15.3-1quantal0) but it is not going to be installed
Depends: r-recommended (= 2.15.3-1quantal0) 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.
any ideas how to start from scratch and get R running again?
More of the Error log:
The following packages have unmet dependencies r-base-core : Depends: libblas3 but it is not installable or libblas.so.3 but it is not installable or libatlas3-base but it is not installable Depends: libc6 (>= 2.15) but 2.13-20ubuntu5.3 is to be installed Depends: liblapack3 but it is not installable or liblapack.so.3 but it is not installable or libatlas3-base but it is not installable Depends: liblzma5 (>= 5.1.1alpha+20120614) but it is not installable –
Try this
If you have added a line from new ubuntu repository to /etc/apt/sources.list, erase the line.
Then, run the commands
sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update
sudo apt-get upgrade
It worked for me, the answer comes from here
http://r.789695.n4.nabble.com/Upgrading-on-Ubuntu-from-2-11-1-to-2-15-1-td4636965.html
Uninstall previous R installation:
sudo R --no-save
pkgList <- installed.packages(priority='NA')
remove.packages(pkgList)
q()
sudo apt-get remove --purge r-cran* r-base*
Follow instructions (for R part) from:
How to install R, JGR and Deducer in Ubuntu
To list what you installed with aptitude type the following
xyz#sxyzcom~$ sudo apt-get remove
This should list what remains of your R install and possibly anything else missing dependencies Then you can run
xyz#sxyzcom~$ sudo apt-get autoremove
and that should get you back to square one.
If you are facing problems regarding Broken packages then first of all remove that package by first checking dependencies and then forcefully remove that package, and don't ever forget to reboot when you do make enormous changes in your system. To remove that package use these shell commands
$ sudo su
Then Enter your password
# apt-cache rdepends package-name
# apt-get --purge remove --force package-name
Use these shell commands
# apt-get clean
# apt-get autoclean
# apt-get update
# apt-get upgrade
# apt-get dist-upgrade
# reboot
This worked for me, Try this, I believe this will fix all your problems, Good luck.
If you want to remove the package forcefully,you can do
sudo dpkg --remove --force-remove-reinstreq package_name
and then
sudo apt-get update